home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 …ember: Reference Library / Dev.CD Dec 94.toast / Technical Documentation / Mac Tech Notes (DocViewer) / PT • Platforms & Tools / PT21 MacApp Segmentation < prev    next >
MacBinary  |  1994-10-19  |  72.0 KB  |  [ONLN/HLX2]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Fri Oct 14 08:35:17 1994, modified Wed Oct 19 09:58:12 1994, creator 'HLX2', type 'ONLN', 71131 bytes "PT21 MacApp Segmentation" , at 0x1165b 2354 bytes resource default (weak)
99% file data default
100% TrID MacBinary 2 default (weak)
100% dexmagic Picasso 64 Image default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[ONLN]
macFileCreator[HLX2]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 18 50 54 32 31 20 4d | 61 63 41 70 70 20 53 65 |..PT21 M|acApp Se|
|00000010| 67 6d 65 6e 74 61 74 69 | 6f 6e 00 00 00 00 00 00 |gmentati|on......|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 01 15 db 00 | 00 09 32 aa c4 2b 85 aa |........|..2..+..|
|00000060| ca d6 74 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..t.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 aa 04 00 00 |........|........|
|00000080| 50 54 20 32 31 20 2d 20 | 4d 61 63 41 70 70 20 53 |PT 21 - |MacApp S|
|00000090| 65 67 6d 65 6e 74 61 74 | 69 6f 6e 20 49 6c 6c 75 |egmentat|ion Illu|
|000000a0| 6d 69 6e 61 74 69 6f 6e | 73 0d 50 6c 61 74 66 6f |mination|s.Platfo|
|000000b0| 72 6d 73 20 61 6e 64 20 | 54 6f 6f 6c 73 09 0d 57 |rms and |Tools..W|
|000000c0| 72 69 74 74 65 6e 20 62 | 79 3a 09 4b 65 6e 74 20 |ritten b|y:.Kent |
|000000d0| 53 61 6e 64 76 69 6b 20 | 61 6e 64 20 4d 69 63 68 |Sandvik |and Mich|
|000000e0| 61 65 6c 20 42 75 72 62 | 69 64 67 65 09 44 65 63 |ael Burb|idge.Dec|
|000000f0| 65 6d 62 65 72 20 31 39 | 39 32 0d 54 68 69 73 20 |ember 19|92.This |
|00000100| 54 65 63 68 6e 69 63 61 | 6c 20 4e 6f 74 65 20 64 |Technica|l Note d|
|00000110| 65 73 63 72 69 62 65 73 | 20 4d 61 63 41 70 70 20 |escribes| MacApp |
|00000120| 73 65 67 6d 65 6e 74 61 | 74 69 6f 6e 20 73 74 72 |segmenta|tion str|
|00000130| 61 74 65 67 69 65 73 20 | 61 6e 64 20 67 75 69 64 |ategies |and guid|
|00000140| 65 6c 69 6e 65 73 2e 20 | 49 74 20 61 6c 73 6f 20 |elines. |It also |
|00000150| 64 65 73 63 72 69 62 65 | 73 20 70 65 72 66 6f 72 |describe|s perfor|
|00000160| 6d 61 6e 63 65 2c 20 72 | 75 6e 74 69 6d 65 2c 20 |mance, r|untime, |
|00000170| 61 6e 64 20 64 65 76 65 | 6c 6f 70 6d 65 6e 74 20 |and deve|lopment |
|00000180| 74 6f 6f 6c 73 20 69 73 | 73 75 65 73 20 72 65 6c |tools is|sues rel|
|00000190| 61 74 65 64 20 74 6f 20 | 73 65 67 6d 65 6e 74 61 |ated to |segmenta|
|000001a0| 74 69 6f 6e 2e 20 53 6f | 6d 65 20 6f 66 20 74 68 |tion. So|me of th|
|000001b0| 65 20 64 69 73 63 75 73 | 73 69 6f 6e 20 69 73 20 |e discus|sion is |
|000001c0| 61 6c 73 6f 20 72 65 6c | 65 76 61 6e 74 20 74 6f |also rel|evant to|
|000001d0| 20 67 65 6e 65 72 61 6c | 20 73 65 67 6d 65 6e 74 | general| segment|
|000001e0| 61 74 69 6f 6e 20 73 74 | 72 61 74 65 67 69 65 73 |ation st|rategies|
|000001f0| 20 77 69 74 68 20 6e 6f | 6e 2d 4d 61 63 41 70 70 | with no|n-MacApp|
|00000200| 2d 62 61 73 65 64 20 61 | 70 70 6c 69 63 61 74 69 |-based a|pplicati|
|00000210| 6f 6e 73 2e 20 54 68 65 | 20 4d 61 63 41 70 70 20 |ons. The| MacApp |
|00000220| 74 65 63 68 6e 69 71 75 | 65 73 20 61 72 65 20 62 |techniqu|es are b|
|00000230| 61 73 65 64 20 6f 6e 20 | 4d 61 63 41 70 70 20 33 |ased on |MacApp 3|
|00000240| 2e 30 3b 20 68 6f 77 65 | 76 65 72 2c 20 6d 61 6e |.0; howe|ver, man|
|00000250| 79 20 6f 66 20 74 68 65 | 20 69 73 73 75 65 73 20 |y of the| issues |
|00000260| 61 72 65 20 61 6c 73 6f | 20 72 65 6c 65 76 61 6e |are also| relevan|
|00000270| 74 20 74 6f 20 4d 61 63 | 41 70 70 20 32 2e 30 2e |t to Mac|App 2.0.|
|00000280| 0d 49 6e 74 72 6f 64 75 | 63 74 69 6f 6e 0d 53 6f |.Introdu|ction.So|
|00000290| 6d 65 20 70 65 6f 70 6c | 65 20 63 6f 6e 73 69 64 |me peopl|e consid|
|000002a0| 65 72 20 64 65 66 69 6e | 69 6e 67 20 61 20 73 65 |er defin|ing a se|
|000002b0| 67 6d 65 6e 74 61 74 69 | 6f 6e 20 73 74 72 61 74 |gmentati|on strat|
|000002c0| 65 67 79 20 66 6f 72 20 | 61 20 4d 61 63 69 6e 74 |egy for |a Macint|
|000002d0| 6f 73 68 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |osh appl|ication |
|000002e0| 61 20 62 6c 61 63 6b 20 | 61 72 74 2e 20 57 65 6c |a black |art. Wel|
|000002f0| 6c 2c 20 69 74 20 69 73 | 20 61 20 66 6f 72 6d 20 |l, it is| a form |
|00000300| 6f 66 20 70 72 6f 67 72 | 61 6d 6d 69 6e 67 20 61 |of progr|amming a|
|00000310| 72 74 2e 20 4c 69 6b 65 | 20 6d 61 6e 79 20 70 72 |rt. Like| many pr|
|00000320| 6f 62 6c 65 6d 73 20 69 | 6e 20 73 6f 66 74 77 61 |oblems i|n softwa|
|00000330| 72 65 20 64 65 76 65 6c | 6f 70 6d 65 6e 74 2c 20 |re devel|opment, |
|00000340| 64 65 66 69 6e 69 6e 67 | 20 61 20 73 65 67 6d 65 |defining| a segme|
|00000350| 6e 74 61 74 69 6f 6e 20 | 73 74 72 61 74 65 67 79 |ntation |strategy|
|00000360| 20 66 6f 72 20 61 20 4d | 61 63 69 6e 74 6f 73 68 | for a M|acintosh|
|00000370| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 72 65 71 | applica|tion req|
|00000380| 75 69 72 65 73 20 63 68 | 6f 6f 73 69 6e 67 20 62 |uires ch|oosing b|
|00000390| 65 74 77 65 65 6e 20 61 | 20 6e 75 6d 62 65 72 20 |etween a| number |
|000003a0| 6f 66 20 63 6f 6e 66 6c | 69 63 74 69 6e 67 20 74 |of confl|icting t|
|000003b0| 72 61 64 65 6f 66 66 73 | 20 74 6f 20 6d 65 65 74 |radeoffs| to meet|
|000003c0| 20 74 68 65 20 70 65 72 | 66 6f 72 6d 61 6e 63 65 | the per|formance|
|000003d0| 20 63 72 69 74 65 72 69 | 61 20 6f 66 20 61 20 67 | criteri|a of a g|
|000003e0| 69 76 65 6e 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |iven app|lication|
|000003f0| 2e 20 53 65 67 6d 65 6e | 74 61 74 69 6f 6e 20 73 |. Segmen|tation s|
|00000400| 74 72 61 74 65 67 69 65 | 73 20 74 68 61 74 20 61 |trategie|s that a|
|00000410| 72 65 20 6f 70 74 69 6d | 69 7a 65 64 20 66 6f 72 |re optim|ized for|
|00000420| 20 73 70 65 65 64 20 67 | 65 6e 65 72 61 6c 6c 79 | speed g|enerally|
|00000430| 20 72 65 71 75 69 72 65 | 20 61 20 6c 61 72 67 65 | require| a large|
|00000440| 72 20 66 6f 6f 74 70 72 | 69 6e 74 20 69 6e 20 6d |r footpr|int in m|
|00000450| 65 6d 6f 72 79 2c 20 77 | 68 69 6c 65 20 73 74 72 |emory, w|hile str|
|00000460| 61 74 65 67 69 65 73 20 | 74 68 61 74 20 61 72 65 |ategies |that are|
|00000470| 20 6f 70 74 69 6d 69 7a | 65 64 20 66 6f 72 20 6d | optimiz|ed for m|
|00000480| 65 6d 6f 72 79 20 75 73 | 61 67 65 20 63 6f 6d 65 |emory us|age come|
|00000490| 20 77 69 74 68 20 61 20 | 70 65 72 66 6f 72 6d 61 | with a |performa|
|000004a0| 6e 63 65 20 68 69 74 2e | 20 55 6e 66 6f 72 74 75 |nce hit.| Unfortu|
|000004b0| 6e 61 74 65 6c 79 2c 20 | 74 68 65 72 65 20 61 72 |nately, |there ar|
|000004c0| 65 20 6e 6f 20 74 6f 6f | 6c 73 20 61 76 61 69 6c |e no too|ls avail|
|000004d0| 61 62 6c 65 20 66 6f 72 | 20 61 75 74 6f 6d 61 74 |able for| automat|
|000004e0| 69 63 61 6c 6c 79 20 73 | 65 67 6d 65 6e 74 69 6e |ically s|egmentin|
|000004f0| 67 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 73 2e 20 |g applic|ations. |
|00000500| 0d 54 68 65 72 65 20 61 | 72 65 20 66 65 77 20 74 |.There a|re few t|
|00000510| 6f 6f 6c 73 20 61 76 61 | 69 6c 61 62 6c 65 20 74 |ools ava|ilable t|
|00000520| 68 61 74 20 68 65 6c 70 | 20 64 65 66 69 6e 65 20 |hat help| define |
|00000530| 73 65 67 6d 65 6e 74 61 | 74 69 6f 6e 20 73 74 72 |segmenta|tion str|
|00000540| 61 74 65 67 69 65 73 2e | 20 41 6c 73 6f 20 74 68 |ategies.| Also th|
|00000550| 65 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 6f 6e |e inform|ation on|
|00000560| 20 68 6f 77 20 74 6f 20 | 64 6f 20 74 68 69 73 20 | how to |do this |
|00000570| 69 73 20 6e 6f 74 20 66 | 75 6c 6c 79 20 64 6f 63 |is not f|ully doc|
|00000580| 75 6d 65 6e 74 65 64 2e | 0d 54 68 69 73 20 54 65 |umented.|.This Te|
|00000590| 63 68 6e 69 63 61 6c 20 | 4e 6f 74 65 20 77 69 6c |chnical |Note wil|
|000005a0| 6c 20 74 72 79 20 74 6f | 20 63 6f 76 65 72 20 74 |l try to| cover t|
|000005b0| 68 65 20 6d 6f 73 74 20 | 69 6d 70 6f 72 74 61 6e |he most |importan|
|000005c0| 74 20 69 73 73 75 65 73 | 20 6f 66 20 73 65 67 6d |t issues| of segm|
|000005d0| 65 6e 74 61 74 69 6f 6e | 20 77 69 74 68 20 4d 61 |entation| with Ma|
|000005e0| 63 41 70 70 20 70 72 6f | 67 72 61 6d 73 20 61 6e |cApp pro|grams an|
|000005f0| 64 20 74 6f 20 68 65 6c | 70 20 64 65 76 65 6c 6f |d to hel|p develo|
|00000600| 70 65 72 73 20 63 72 65 | 61 74 65 20 74 68 65 69 |pers cre|ate thei|
|00000610| 72 20 6f 77 6e 20 73 65 | 67 6d 65 6e 74 61 74 69 |r own se|gmentati|
|00000620| 6f 6e 20 73 74 72 61 74 | 65 67 69 65 73 2e 0d 54 |on strat|egies..T|
|00000630| 68 65 20 4e 65 65 64 20 | 66 6f 72 20 53 65 67 6d |he Need |for Segm|
|00000640| 65 6e 74 61 74 69 6f 6e | 0d 49 6e 73 69 64 65 20 |entation|.Inside |
|00000650| 4d 61 63 69 6e 74 6f 73 | 68 20 64 65 73 63 72 69 |Macintos|h descri|
|00000660| 62 65 73 20 68 6f 77 20 | 74 68 65 20 53 65 67 6d |bes how |the Segm|
|00000670| 65 6e 74 20 4c 6f 61 64 | 65 72 20 77 6f 72 6b 73 |ent Load|er works|
|00000680| 2c 20 61 6e 64 20 77 68 | 79 20 74 68 65 72 65 d5 |, and wh|y there.|
|00000690| 73 20 61 20 6e 65 65 64 | 20 74 6f 20 63 72 65 61 |s a need| to crea|
|000006a0| 74 65 20 73 65 67 6d 65 | 6e 74 73 20 74 68 61 74 |te segme|nts that|
|000006b0| 20 61 72 65 20 6c 6f 61 | 64 65 64 20 69 6e 74 6f | are loa|ded into|
|000006c0| 20 6d 65 6d 6f 72 79 20 | 6f 6e 20 64 65 6d 61 6e | memory |on deman|
|000006d0| 64 2e 20 54 68 65 20 73 | 79 6e 74 61 78 20 66 6f |d. The s|yntax fo|
|000006e0| 72 20 63 72 65 61 74 69 | 6e 67 20 61 20 73 65 67 |r creati|ng a seg|
|000006f0| 6d 65 6e 74 20 6e 61 6d | 65 20 69 73 3a 0d 43 2b |ment nam|e is:.C+|
|00000700| 2b 3a 09 09 53 70 65 63 | 69 66 79 20 61 20 23 70 |+:..Spec|ify a #p|
|00000710| 72 61 67 6d 61 20 73 65 | 67 6d 65 6e 74 20 53 65 |ragma se|gment Se|
|00000720| 67 6d 65 6e 74 4e 61 6d | 65 20 69 6e 20 66 72 6f |gmentNam|e in fro|
|00000730| 6e 74 20 6f 66 20 74 68 | 65 20 6d 65 6d 62 65 72 |nt of th|e member|
|00000740| 20 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | . | |
|00000750| 20 20 20 20 20 20 20 20 | 20 20 66 75 6e 63 74 69 | | functi|
|00000760| 6f 6e 20 0d 4f 62 6a 65 | 63 74 20 50 61 73 63 61 |on .Obje|ct Pasca|
|00000770| 6c 3a 20 20 53 70 65 63 | 69 66 79 20 61 20 7b 24 |l: Spec|ify a {$|
|00000780| 53 20 53 65 67 6d 65 6e | 74 4e 61 6d 65 7d 20 69 |S Segmen|tName} i|
|00000790| 6e 20 66 72 6f 6e 74 20 | 6f 66 20 74 68 65 20 6d |n front |of the m|
|000007a0| 65 74 68 6f 64 0d 49 66 | 20 79 6f 75 20 66 6f 72 |ethod.If| you for|
|000007b0| 67 65 74 20 74 6f 20 70 | 6c 61 63 65 20 74 68 65 |get to p|lace the|
|000007c0| 20 73 65 67 6d 65 6e 74 | 20 63 6f 6d 70 69 6c 65 | segment| compile|
|000007d0| 72 20 64 69 72 65 63 74 | 69 76 65 73 20 69 6e 20 |r direct|ives in |
|000007e0| 79 6f 75 72 20 6d 65 74 | 68 6f 64 2c 20 69 74 20 |your met|hod, it |
|000007f0| 77 69 6c 6c 20 69 6e 68 | 65 72 69 74 20 74 68 65 |will inh|erit the|
|00000800| 20 65 61 72 6c 69 65 72 | 20 64 69 72 65 63 74 69 | earlier| directi|
|00000810| 76 65 20 28 69 6e 20 43 | 2b 2b 20 61 73 20 77 65 |ve (in C|++ as we|
|00000820| 6c 6c 20 61 73 20 69 6e | 20 4f 62 6a 65 63 74 20 |ll as in| Object |
|00000830| 50 61 73 63 61 6c 29 20 | 61 6c 6c 20 74 68 65 20 |Pascal) |all the |
|00000840| 77 61 79 20 74 6f 20 74 | 68 65 20 65 6e 64 20 6f |way to t|he end o|
|00000850| 66 20 74 68 65 20 66 69 | 6c 65 2c 20 73 6f 20 73 |f the fi|le, so s|
|00000860| 75 64 64 65 6e 6c 79 20 | 79 6f 75 d5 6c 6c 20 66 |uddenly |you.ll f|
|00000870| 69 6e 64 20 6d 61 6e 79 | 20 6d 65 74 68 6f 64 73 |ind many| methods|
|00000880| 20 69 6e 73 69 64 65 20 | 6f 6e 65 20 6f 66 20 79 | inside |one of y|
|00000890| 6f 75 72 20 73 65 67 6d | 65 6e 74 73 2e 20 4d 65 |our segm|ents. Me|
|000008a0| 74 68 6f 64 73 20 77 69 | 74 68 6f 75 74 20 61 6e |thods wi|thout an|
|000008b0| 79 20 64 65 66 69 6e 65 | 64 20 73 65 67 6d 65 6e |y define|d segmen|
|000008c0| 74 20 77 69 6c 6c 20 67 | 6f 20 69 6e 74 6f 20 74 |t will g|o into t|
|000008d0| 68 65 20 4d 61 69 6e 20 | 73 65 67 6d 65 6e 74 2c |he Main |segment,|
|000008e0| 20 77 68 69 63 68 20 63 | 6f 75 6c 64 20 67 65 74 | which c|ould get|
|000008f0| 20 72 65 61 6c 6c 79 20 | 63 72 6f 77 64 65 64 20 | really |crowded |
|00000900| 61 66 74 65 72 20 61 20 | 77 68 69 6c 65 2e 20 53 |after a |while. S|
|00000910| 6f 2c 20 63 68 65 63 6b | 20 79 6f 75 72 20 73 65 |o, check| your se|
|00000920| 67 6d 65 6e 74 61 74 69 | 6f 6e 20 64 69 72 65 63 |gmentati|on direc|
|00000930| 74 69 76 65 20 66 6f 72 | 20 65 61 63 68 20 6d 65 |tive for| each me|
|00000940| 74 68 6f 64 2e 20 46 6f | 72 20 69 6e 73 74 61 6e |thod. Fo|r instan|
|00000950| 63 65 20 4d 61 63 42 72 | 6f 77 73 65 20 68 61 73 |ce MacBr|owse has|
|00000960| 20 61 20 66 75 6e 63 74 | 69 6f 6e 20 66 6f 72 20 | a funct|ion for |
|00000970| 64 6f 69 6e 67 20 74 68 | 69 73 20 74 68 61 74 20 |doing th|is that |
|00000980| 73 68 6f 77 73 20 77 68 | 61 74 20 65 61 63 68 20 |shows wh|at each |
|00000990| 73 65 67 6d 65 6e 74 20 | 63 6f 6e 74 61 69 6e 73 |segment |contains|
|000009a0| 2e 20 41 6c 73 6f 2c 20 | 74 68 65 20 4c 69 6e 6b |. Also, |the Link|
|000009b0| 20 2d 6d 61 70 20 28 6f | 72 20 74 68 65 20 4d 41 | -map (o|r the MA|
|000009c0| 42 75 69 6c 64 20 2d 4c | 69 6e 6b 4d 61 70 29 20 |Build -L|inkMap) |
|000009d0| 66 6c 61 67 20 63 72 65 | 61 74 65 73 20 61 20 6c |flag cre|ates a l|
|000009e0| 69 6e 6b 20 6d 61 70 20 | 77 69 74 68 20 69 6e 66 |ink map |with inf|
|000009f0| 6f 72 6d 61 74 69 6f 6e | 20 61 62 6f 75 74 20 77 |ormation| about w|
|00000a00| 68 61 74 20 66 75 6e 63 | 74 69 6f 6e 73 20 62 65 |hat func|tions be|
|00000a10| 6c 6f 6e 67 20 74 6f 20 | 77 68 61 74 20 73 65 67 |long to |what seg|
|00000a20| 6d 65 6e 74 73 2e 0d 53 | 65 67 6d 65 6e 74 73 20 |ments..S|egments |
|00000a30| 61 72 65 20 72 65 61 6c | 6c 79 20 43 4f 44 45 20 |are real|ly CODE |
|00000a40| 72 65 73 6f 75 72 63 65 | 73 20 69 6e 20 64 69 73 |resource|s in dis|
|00000a50| 67 75 69 73 65 2c 20 73 | 6f 20 4d 61 63 41 70 70 |guise, s|o MacApp|
|00000a60| 20 69 73 20 61 62 6c 65 | 20 74 6f 20 63 6f 6e 74 | is able| to cont|
|00000a70| 72 6f 6c 20 74 68 65 20 | 70 75 72 67 65 20 61 6e |rol the |purge an|
|00000a80| 64 20 6c 6f 63 6b 20 62 | 69 74 73 20 6f 6e 20 73 |d lock b|its on s|
|00000a90| 65 67 6d 65 6e 74 73 20 | 6a 75 73 74 20 61 73 20 |egments |just as |
|00000aa0| 69 74 20 64 6f 65 73 20 | 6f 6e 20 68 61 6e 64 6c |it does |on handl|
|00000ab0| 65 73 20 6f 72 20 6f 62 | 6a 65 63 74 73 20 28 61 |es or ob|jects (a|
|00000ac0| 73 20 69 6e 20 54 4f 62 | 6a 65 63 74 d5 73 20 4c |s in TOb|ject.s L|
|00000ad0| 6f 63 6b 20 61 6e 64 20 | 55 6e 4c 6f 63 6b 20 6d |ock and |UnLock m|
|00000ae0| 65 74 68 6f 64 73 29 2e | 20 41 20 6c 6f 63 6b 65 |ethods).| A locke|
|00000af0| 64 20 68 61 6e 64 6c 65 | 20 69 73 20 61 6c 73 6f |d handle| is also|
|00000b00| 20 75 6e 70 75 72 67 65 | 61 62 6c 65 2c 20 73 6f | unpurge|able, so|
|00000b10| 20 79 6f 75 20 64 6f 6e | d5 74 20 6e 65 65 64 20 | you don|.t need |
|00000b20| 74 6f 20 77 6f 72 72 79 | 20 61 62 6f 75 74 20 70 |to worry| about p|
|00000b30| 75 72 67 69 6e 67 20 6f | 6e 63 65 20 79 6f 75 20 |urging o|nce you |
|00000b40| 68 61 76 65 20 6c 6f 63 | 6b 65 64 20 74 68 65 20 |have loc|ked the |
|00000b50| 6f 62 6a 65 63 74 20 69 | 6e 20 6d 65 6d 6f 72 79 |object i|n memory|
|00000b60| 2e 20 4d 61 63 41 70 70 | 20 6d 61 72 6b 73 20 61 |. MacApp| marks a|
|00000b70| 6c 6c 20 63 6f 64 65 20 | 73 65 67 6d 65 6e 74 73 |ll code |segments|
|00000b80| 20 61 73 20 6e 6f 6e 70 | 75 72 67 65 61 62 6c 65 | as nonp|urgeable|
|00000b90| 20 73 6f 20 74 68 61 74 | 20 74 68 65 20 4d 61 63 | so that| the Mac|
|00000ba0| 41 70 70 20 6d 65 6d 6f | 72 79 20 6d 61 6e 61 67 |App memo|ry manag|
|00000bb0| 65 72 20 63 61 6e 20 63 | 6f 6e 74 72 6f 6c 20 77 |er can c|ontrol w|
|00000bc0| 68 65 6e 20 61 6e 64 20 | 77 68 69 63 68 20 73 65 |hen and |which se|
|00000bd0| 67 6d 65 6e 74 73 20 69 | 74 20 70 75 72 67 65 73 |gments i|t purges|
|00000be0| 20 69 6e 20 6c 6f 77 20 | 6d 65 6d 6f 72 79 20 63 | in low |memory c|
|00000bf0| 6f 6e 64 69 74 69 6f 6e | 73 2e 0d 4d 65 74 68 6f |ondition|s..Metho|
|00000c00| 64 73 20 61 72 65 20 74 | 68 65 20 61 63 74 75 61 |ds are t|he actua|
|00000c10| 6c 20 72 6f 75 74 69 6e | 65 73 20 73 74 6f 72 65 |l routin|es store|
|00000c20| 64 20 69 6e 20 74 68 65 | 20 43 4f 44 45 20 72 65 |d in the| CODE re|
|00000c30| 73 6f 75 72 63 65 73 3b | 20 64 61 74 61 20 69 73 |sources;| data is|
|00000c40| 20 73 74 6f 72 65 64 20 | 65 69 74 68 65 72 20 6f | stored |either o|
|00000c50| 6e 20 74 68 65 20 73 74 | 61 63 6b 2c 20 69 6e 20 |n the st|ack, in |
|00000c60| 74 68 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |the appl|ication |
|00000c70| 68 65 61 70 2c 20 6f 72 | 20 69 6e 20 74 68 65 20 |heap, or| in the |
|00000c80| 73 70 65 63 69 66 69 63 | 20 70 61 72 74 20 6f 66 |specific| part of|
|00000c90| 20 74 68 65 20 68 65 61 | 70 20 74 68 61 74 20 69 | the hea|p that i|
|00000ca0| 73 20 74 68 65 20 41 35 | 2d 77 6f 72 6c 64 2e 20 |s the A5|-world. |
|00000cb0| 49 6e 20 6d 61 6e 79 20 | 63 61 73 65 73 2c 20 63 |In many |cases, c|
|00000cc0| 61 6c 6c 69 6e 67 20 61 | 20 6d 65 74 68 6f 64 20 |alling a| method |
|00000cd0| 77 68 6f 73 65 20 73 65 | 67 6d 65 6e 74 20 69 73 |whose se|gment is|
|00000ce0| 20 6e 6f 74 20 63 75 72 | 72 65 6e 74 6c 79 20 73 | not cur|rently s|
|00000cf0| 74 6f 72 65 64 20 69 6e | 20 6d 65 6d 6f 72 79 20 |tored in| memory |
|00000d00| 63 61 75 73 65 73 20 61 | 20 73 65 67 6d 65 6e 74 |causes a| segment|
|00000d10| 20 6c 6f 61 64 20 74 6f | 20 6f 63 63 75 72 2c 20 | load to| occur, |
|00000d20| 77 68 69 63 68 20 6d 69 | 67 68 74 20 63 61 75 73 |which mi|ght caus|
|00000d30| 65 20 68 65 61 70 20 62 | 6c 6f 63 6b 73 20 74 6f |e heap b|locks to|
|00000d40| 20 62 65 20 6d 6f 76 65 | 64 20 69 6e 20 6f 72 64 | be move|d in ord|
|00000d50| 65 72 20 74 6f 20 6c 6f | 63 61 74 65 20 61 20 70 |er to lo|cate a p|
|00000d60| 6c 61 63 65 20 74 6f 20 | 70 75 74 20 74 68 65 20 |lace to |put the |
|00000d70| 6e 65 77 20 73 65 67 6d | 65 6e 74 2e 20 0d 4e 6f |new segm|ent. .No|
|00000d80| 74 65 3a 20 54 68 69 73 | 20 69 73 20 6f 6e 65 20 |te: This| is one |
|00000d90| 72 65 61 73 6f 6e 20 63 | 61 6c 6c 69 6e 67 20 61 |reason c|alling a|
|00000da0| 20 6e 65 77 20 63 6c 61 | 73 73 20 6d 65 74 68 6f | new cla|ss metho|
|00000db0| 64 20 63 61 6e 20 73 75 | 64 64 65 6e 6c 79 20 74 |d can su|ddenly t|
|00000dc0| 72 69 67 67 65 72 20 6d | 65 6d 6f 72 79 20 64 65 |rigger m|emory de|
|00000dd0| 72 65 66 65 72 65 6e 63 | 69 6e 67 20 62 75 67 73 |referenc|ing bugs|
|00000de0| 2e 0d 4a 75 6d 70 20 54 | 61 62 6c 65 73 20 61 6e |..Jump T|ables an|
|00000df0| 64 20 50 65 72 66 6f 72 | 6d 61 6e 63 65 0d 54 68 |d Perfor|mance.Th|
|00000e00| 65 72 65 20 69 73 20 61 | 20 6b 6e 6f 77 6e 20 72 |ere is a| known r|
|00000e10| 65 6c 61 74 69 6f 6e 20 | 62 65 74 77 65 65 6e 20 |elation |between |
|00000e20| 6a 75 6d 70 20 74 61 62 | 6c 65 20 73 69 7a 65 73 |jump tab|le sizes|
|00000e30| 20 61 6e 64 20 73 65 67 | 6d 65 6e 74 61 74 69 6f | and seg|mentatio|
|00000e40| 6e 2e 20 46 6f 72 20 6e | 6f 72 6d 61 6c 20 70 72 |n. For n|ormal pr|
|00000e50| 6f 63 65 64 75 72 65 73 | 20 61 6e 64 20 66 75 6e |ocedures| and fun|
|00000e60| 63 74 69 6f 6e 73 2c 20 | 77 65 20 64 6f 6e d5 74 |ctions, |we don.t|
|00000e70| 20 6e 65 65 64 20 61 20 | 6a 75 6d 70 20 74 61 62 | need a |jump tab|
|00000e80| 6c 65 20 65 6e 74 72 79 | 20 69 66 20 61 6c 6c 20 |le entry| if all |
|00000e90| 63 61 6c 6c 73 20 74 6f | 20 74 68 65 20 72 6f 75 |calls to| the rou|
|00000ea0| 74 69 6e 65 20 61 72 65 | 20 66 72 6f 6d 20 74 68 |tine are| from th|
|00000eb0| 65 20 73 61 6d 65 20 73 | 65 67 6d 65 6e 74 20 28 |e same s|egment (|
|00000ec0| 69 6e 74 72 61 73 65 67 | 6d 65 6e 74 20 63 61 6c |intraseg|ment cal|
|00000ed0| 6c 29 2e 20 48 6f 77 65 | 76 65 72 2c 20 77 65 20 |l). Howe|ver, we |
|00000ee0| 6e 65 65 64 20 6a 75 6d | 70 20 74 61 62 6c 65 20 |need jum|p table |
|00000ef0| 65 6e 74 72 69 65 73 20 | 69 66 20 74 68 65 72 65 |entries |if there|
|00000f00| 20 61 72 65 20 63 61 6c | 6c 73 20 74 6f 20 6f 74 | are cal|ls to ot|
|00000f10| 68 65 72 20 73 65 67 6d | 65 6e 74 73 20 66 72 6f |her segm|ents fro|
|00000f20| 6d 20 74 68 65 20 72 6f | 75 74 69 6e 65 20 28 69 |m the ro|utine (i|
|00000f30| 6e 74 65 72 73 65 67 6d | 65 6e 74 20 63 61 6c 6c |ntersegm|ent call|
|00000f40| 73 29 2e 20 45 78 61 6d | 69 6e 65 20 74 68 65 20 |s). Exam|ine the |
|00000f50| 73 65 67 6d 65 6e 74 61 | 74 69 6f 6e 20 6f 66 20 |segmenta|tion of |
|00000f60| 79 6f 75 72 20 63 6f 64 | 65 3b 20 79 6f 75 20 6d |your cod|e; you m|
|00000f70| 69 67 68 74 20 66 69 6e | 64 20 70 6c 61 63 65 73 |ight fin|d places|
|00000f80| 20 77 68 65 72 65 20 61 | 20 63 68 61 6e 67 65 20 | where a| change |
|00000f90| 69 6e 20 73 65 67 6d 65 | 6e 74 61 74 69 6f 6e 20 |in segme|ntation |
|00000fa0| 77 6f 75 6c 64 20 65 6c | 69 6d 69 6e 61 74 65 20 |would el|iminate |
|00000fb0| 6a 75 6d 70 20 74 61 62 | 6c 65 20 65 6e 74 72 69 |jump tab|le entri|
|00000fc0| 65 73 2e 20 57 69 74 68 | 20 73 6f 6d 65 20 65 66 |es. With| some ef|
|00000fd0| 66 6f 72 74 20 79 6f 75 | 20 6d 61 79 20 73 68 72 |fort you| may shr|
|00000fe0| 69 6e 6b 20 62 69 67 20 | 6a 75 6d 70 20 74 61 62 |ink big |jump tab|
|00000ff0| 6c 65 73 20 61 6e 64 20 | 69 6d 70 72 6f 76 65 20 |les and |improve |
|00001000| 74 68 65 20 70 65 72 66 | 6f 72 6d 61 6e 63 65 20 |the perf|ormance |
|00001010| 6f 66 20 79 6f 75 72 20 | 61 70 70 6c 69 63 61 74 |of your |applicat|
|00001020| 69 6f 6e 2e 20 0d 4e 6f | 74 65 3a 20 4f 62 6a 65 |ion. .No|te: Obje|
|00001030| 63 74 2d 6f 72 69 65 6e | 74 65 64 20 63 6f 64 65 |ct-orien|ted code|
|00001040| 20 72 65 6c 79 69 6e 67 | 20 6f 6e 20 70 6f 6c 79 | relying| on poly|
|00001050| 6d 6f 72 70 68 69 73 6d | 20 6d 61 6b 65 73 20 74 |morphism| makes t|
|00001060| 68 69 73 20 61 70 70 72 | 6f 61 63 68 20 6e 65 61 |his appr|oach nea|
|00001070| 72 6c 79 20 69 6d 70 6f | 73 73 69 62 6c 65 2e 20 |rly impo|ssible. |
|00001080| 54 68 69 73 20 69 73 20 | 62 65 63 61 75 73 65 20 |This is |because |
|00001090| 77 65 20 77 69 6c 6c 20 | 6e 65 76 65 72 20 6b 6e |we will |never kn|
|000010a0| 6f 77 20 77 68 61 74 20 | 66 75 6e 63 74 69 6f 6e |ow what |function|
|000010b0| 20 69 73 20 66 69 6e 61 | 6c 6c 79 20 63 61 6c 6c | is fina|lly call|
|000010c0| 65 64 20 76 69 61 20 74 | 68 65 20 76 69 72 74 75 |ed via t|he virtu|
|000010d0| 61 6c 20 6f 72 20 6d 65 | 74 68 6f 64 20 74 61 62 |al or me|thod tab|
|000010e0| 6c 65 20 64 69 73 70 61 | 74 63 68 2e 0d 53 6f 6d |le dispa|tch..Som|
|000010f0| 65 20 70 72 6f 67 72 61 | 6d 6d 65 72 73 20 77 6f |e progra|mmers wo|
|00001100| 72 72 79 20 74 68 61 74 | 20 6d 61 6e 79 20 43 2b |rry that| many C+|
|00001110| 2b 20 61 63 63 65 73 73 | 6f 72 20 28 47 65 74 c9 |+ access|or (Get.|
|00001120| 29 20 61 6e 64 20 6d 75 | 74 61 74 6f 72 20 28 53 |) and mu|tator (S|
|00001130| 65 74 c9 29 20 6d 65 74 | 68 6f 64 73 20 77 69 6c |et.) met|hods wil|
|00001140| 6c 20 69 6e 63 72 65 61 | 73 65 20 74 68 65 20 6a |l increa|se the j|
|00001150| 75 6d 70 20 74 61 62 6c | 65 20 65 6e 74 72 69 65 |ump tabl|e entrie|
|00001160| 73 20 63 6f 6e 73 69 64 | 65 72 61 62 6c 79 2c 20 |s consid|erably, |
|00001170| 62 75 74 20 79 6f 75 20 | 63 61 6e 20 61 76 6f 69 |but you |can avoi|
|00001180| 64 20 74 68 69 73 20 62 | 79 20 75 73 69 6e 67 20 |d this b|y using |
|00001190| 43 2b 2b 20 69 6e 6c 69 | 6e 65 20 66 75 6e 63 74 |C++ inli|ne funct|
|000011a0| 69 6f 6e 73 2e 20 41 6e | 79 77 61 79 2c 20 69 66 |ions. An|yway, if|
|000011b0| 20 79 6f 75 72 20 63 6c | 61 73 73 65 73 20 68 61 | your cl|asses ha|
|000011c0| 76 65 20 74 6f 6f 20 6d | 61 6e 79 20 66 69 65 6c |ve too m|any fiel|
|000011d0| 64 20 63 68 61 6e 67 65 | 20 61 6e 64 20 61 63 63 |d change| and acc|
|000011e0| 65 73 73 20 6d 65 74 68 | 6f 64 73 2c 20 70 65 72 |ess meth|ods, per|
|000011f0| 68 61 70 73 20 69 74 20 | 69 73 20 74 69 6d 65 20 |haps it |is time |
|00001200| 74 6f 20 65 78 61 6d 69 | 6e 65 20 74 68 65 20 6f |to exami|ne the o|
|00001210| 62 6a 65 63 74 2e 20 49 | 73 20 69 74 20 72 65 61 |bject. I|s it rea|
|00001220| 6c 6c 79 20 61 20 73 74 | 72 75 63 74 75 72 65 20 |lly a st|ructure |
|00001230| 69 6e 20 64 69 73 67 75 | 69 73 65 3f 0d 43 61 63 |in disgu|ise?.Cac|
|00001240| 68 69 6e 67 20 6f 66 20 | 6d 65 6d 62 65 72 20 66 |hing of |member f|
|00001250| 69 65 6c 64 20 76 61 6c | 75 65 73 20 69 6e 73 69 |ield val|ues insi|
|00001260| 64 65 20 74 68 65 20 63 | 6c 61 73 73 20 28 66 6f |de the c|lass (fo|
|00001270| 72 20 69 6e 73 74 61 6e | 63 65 20 6b 65 65 70 69 |r instan|ce keepi|
|00001280| 6e 67 20 74 72 61 63 6b | 20 6f 66 20 66 69 65 6c |ng track| of fiel|
|00001290| 64 20 76 61 6c 75 65 73 | 20 75 73 69 6e 67 20 74 |d values| using t|
|000012a0| 65 6d 70 20 76 61 72 69 | 61 62 6c 65 73 29 20 64 |emp vari|ables) d|
|000012b0| 65 63 72 65 61 73 65 73 | 20 74 68 65 20 6e 65 65 |ecreases| the nee|
|000012c0| 64 20 66 6f 72 20 47 65 | 74 20 61 6e 64 20 53 65 |d for Ge|t and Se|
|000012d0| 74 20 63 61 6c 6c 73 2e | 20 54 68 69 73 20 64 65 |t calls.| This de|
|000012e0| 73 69 67 6e 20 69 73 2c | 20 68 6f 77 65 76 65 72 |sign is,| however|
|000012f0| 2c 20 6e 6f 74 20 70 75 | 72 65 6c 79 20 6f 62 6a |, not pu|rely obj|
|00001300| 65 63 74 2d 6f 72 69 65 | 6e 74 65 64 2c 20 62 65 |ect-orie|nted, be|
|00001310| 63 61 75 73 65 20 74 68 | 65 20 63 6c 61 73 73 20 |cause th|e class |
|00001320| 74 68 65 6e 20 6e 65 65 | 64 73 20 74 6f 20 6b 6e |then nee|ds to kn|
|00001330| 6f 77 20 61 62 6f 75 74 | 20 74 68 65 20 69 6e 74 |ow about| the int|
|00001340| 65 72 6e 61 6c 20 69 6d | 70 6c 65 6d 65 6e 74 61 |ernal im|plementa|
|00001350| 74 69 6f 6e 20 6f 66 20 | 61 6e 20 6f 62 6a 65 63 |tion of |an objec|
|00001360| 74 2e 20 46 6f 72 20 69 | 6e 73 74 61 6e 63 65 20 |t. For i|nstance |
|00001370| 69 74 20 6e 65 65 64 73 | 20 74 6f 20 6b 6e 6f 77 |it needs| to know|
|00001380| 20 77 68 65 6e 20 74 68 | 65 20 63 61 63 68 65 64 | when th|e cached|
|00001390| 20 76 61 6c 75 65 20 69 | 73 20 69 6e 76 61 6c 69 | value i|s invali|
|000013a0| 64 2c 20 61 6e 64 20 69 | 74 20 61 6c 73 6f 20 61 |d, and i|t also a|
|000013b0| 73 73 75 6d 65 73 20 74 | 6f 6f 20 6d 75 63 68 20 |ssumes t|oo much |
|000013c0| 61 62 6f 75 74 20 74 68 | 65 20 69 6e 74 65 72 6e |about th|e intern|
|000013d0| 61 6c 20 66 69 65 6c 64 | 73 2e 20 49 6e 20 61 64 |al field|s. In ad|
|000013e0| 64 69 74 69 6f 6e 2c 20 | 77 65 20 63 6f 75 6c 64 |dition, |we could|
|000013f0| 20 70 6c 61 63 65 20 74 | 68 65 20 6d 61 6a 6f 72 | place t|he major|
|00001400| 20 70 61 72 74 73 20 6f | 66 20 61 6e 20 6f 62 6a | parts o|f an obj|
|00001410| 65 63 74 20 69 6e 73 69 | 64 65 20 6f 6e 65 20 73 |ect insi|de one s|
|00001420| 69 6e 67 6c 65 20 73 65 | 67 6d 65 6e 74 20 66 6f |ingle se|gment fo|
|00001430| 72 20 66 75 72 74 68 65 | 72 20 70 65 72 66 6f 72 |r furthe|r perfor|
|00001440| 6d 61 6e 63 65 20 69 6d | 70 72 6f 76 65 6d 65 6e |mance im|provemen|
|00001450| 74 73 2e 20 54 68 69 73 | 20 68 65 6c 70 73 20 6d |ts. This| helps m|
|00001460| 6f 73 74 6c 79 20 69 66 | 20 74 68 65 20 61 63 63 |ostly if| the acc|
|00001470| 65 73 73 6f 72 73 20 61 | 72 65 20 70 72 6f 76 69 |essors a|re provi|
|00001480| 64 69 6e 67 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |ding inf|ormation|
|00001490| 20 74 6f 20 6f 74 68 65 | 72 20 6f 62 6a 65 63 74 | to othe|r object|
|000014a0| 73 20 74 68 61 74 20 72 | 65 73 69 64 65 20 69 6e |s that r|eside in|
|000014b0| 20 74 68 65 20 73 61 6d | 65 20 73 65 67 6d 65 6e | the sam|e segmen|
|000014c0| 74 2c 20 61 73 20 69 6e | 20 74 68 65 20 63 61 73 |t, as in| the cas|
|000014d0| 65 20 77 68 65 72 65 20 | 77 65 20 75 73 65 20 61 |e where |we use a|
|000014e0| 63 63 65 73 73 6f 72 73 | 20 69 6e 74 65 72 6e 61 |ccessors| interna|
|000014f0| 6c 6c 79 20 69 6e 20 74 | 68 65 20 73 61 6d 65 20 |lly in t|he same |
|00001500| 6f 62 6a 65 63 74 2e 20 | 59 6f 75 20 63 61 6e 20 |object. |You can |
|00001510| 75 73 65 20 64 75 6d 70 | 6f 62 6a 20 74 6f 20 64 |use dump|obj to d|
|00001520| 75 6d 70 20 74 68 65 20 | 6f 62 6a 65 63 74 20 66 |ump the |object f|
|00001530| 69 6c 65 20 61 6e 64 20 | 66 69 6e 64 20 69 6e 66 |ile and |find inf|
|00001540| 6f 72 6d 61 74 69 6f 6e | 20 61 62 6f 75 74 20 65 |ormation| about e|
|00001550| 61 63 68 20 73 65 67 6d | 65 6e 74 2e 20 0d 54 68 |ach segm|ent. .Th|
|00001560| 65 20 53 65 67 6d 65 6e | 74 20 4c 6f 61 64 65 72 |e Segmen|t Loader|
|00001570| 20 68 61 73 20 74 6f 20 | 66 69 6c 6c 20 74 68 65 | has to |fill the|
|00001580| 20 6a 75 6d 70 20 74 61 | 62 6c 65 20 77 69 74 68 | jump ta|ble with|
|00001590| 20 74 68 65 20 72 69 67 | 68 74 20 61 64 64 72 65 | the rig|ht addre|
|000015a0| 73 73 65 73 20 77 68 65 | 6e 20 74 68 65 20 73 65 |sses whe|n the se|
|000015b0| 67 6d 65 6e 74 73 20 61 | 72 65 20 6c 6f 61 64 65 |gments a|re loade|
|000015c0| 64 20 69 6e 2e 20 57 68 | 65 6e 20 74 68 65 20 73 |d in. Wh|en the s|
|000015d0| 65 67 6d 65 6e 74 20 69 | 73 20 75 6e 6c 6f 61 64 |egment i|s unload|
|000015e0| 65 64 2c 20 74 68 65 20 | 65 6e 76 69 72 6f 6e 6d |ed, the |environm|
|000015f0| 65 6e 74 20 68 61 73 20 | 74 6f 20 72 65 73 65 74 |ent has |to reset|
|00001600| 20 74 68 65 20 6a 75 6d | 70 20 74 61 62 6c 65 20 | the jum|p table |
|00001610| 77 69 74 68 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |with inf|ormation|
|00001620| 20 61 62 6f 75 74 20 74 | 68 65 20 6d 69 73 73 69 | about t|he missi|
|00001630| 6e 67 20 73 65 67 6d 65 | 6e 74 2e 20 4d 61 63 41 |ng segme|nt. MacA|
|00001640| 70 70 20 68 61 73 20 74 | 6f 20 6d 61 6b 65 20 73 |pp has t|o make s|
|00001650| 75 72 65 20 74 68 61 74 | 20 6d 65 6d 6f 72 79 20 |ure that| memory |
|00001660| 69 73 20 61 6c 77 61 79 | 73 20 61 76 61 69 6c 61 |is alway|s availa|
|00001670| 62 6c 65 20 66 6f 72 20 | 64 61 74 61 20 61 6e 64 |ble for |data and|
|00001680| 20 75 6e 6c 6f 61 64 65 | 64 20 73 65 67 6d 65 6e | unloade|d segmen|
|00001690| 74 73 2e 20 41 6c 6c 20 | 74 68 69 73 20 74 61 6b |ts. All |this tak|
|000016a0| 65 73 20 74 69 6d 65 2c | 20 73 6f 20 63 6c 65 76 |es time,| so clev|
|000016b0| 65 72 20 73 65 67 6d 65 | 6e 74 61 74 69 6f 6e 20 |er segme|ntation |
|000016c0| 64 6f 65 73 20 69 6d 70 | 72 6f 76 65 20 70 65 72 |does imp|rove per|
|000016d0| 66 6f 72 6d 61 6e 63 65 | 2e 20 41 6c 73 6f 2c 20 |formance|. Also, |
|000016e0| 50 6f 77 65 72 42 6f 6f | 6b 20 6f 77 6e 65 72 73 |PowerBoo|k owners|
|000016f0| 20 64 6f 6e d5 74 20 6c | 69 6b 65 20 61 70 70 6c | don.t l|ike appl|
|00001700| 69 63 61 74 69 6f 6e 73 | 20 74 68 61 74 20 73 70 |ications| that sp|
|00001710| 65 6e 64 20 61 20 6c 6f | 74 20 69 66 20 74 69 6d |end a lo|t if tim|
|00001720| 65 20 73 74 61 72 74 69 | 6e 67 20 74 68 65 20 68 |e starti|ng the h|
|00001730| 61 72 64 20 64 69 73 6b | d1 66 6f 72 20 69 6e 73 |ard disk|.for ins|
|00001740| 74 61 6e 63 65 20 66 6f | 72 20 66 65 74 63 68 69 |tance fo|r fetchi|
|00001750| 6e 67 20 43 4f 44 45 20 | 72 65 73 6f 75 72 63 65 |ng CODE |resource|
|00001760| 73 20 66 72 65 71 75 65 | 6e 74 6c 79 21 20 46 6f |s freque|ntly! Fo|
|00001770| 72 20 65 78 61 6d 70 6c | 65 2c 20 69 66 20 77 65 |r exampl|e, if we|
|00001780| 20 70 6c 61 63 65 20 66 | 75 6e 63 74 69 6f 6e 73 | place f|unctions|
|00001790| 20 74 68 61 74 20 63 61 | 6c 6c 20 65 61 63 68 20 | that ca|ll each |
|000017a0| 6f 74 68 65 72 20 69 6e | 20 74 68 65 20 73 61 6d |other in| the sam|
|000017b0| 65 20 73 65 67 6d 65 6e | 74 2c 20 77 65 20 77 69 |e segmen|t, we wi|
|000017c0| 6c 6c 20 65 6c 69 6d 69 | 6e 61 74 65 20 6f 74 68 |ll elimi|nate oth|
|000017d0| 65 72 20 73 65 67 6d 65 | 6e 74 20 6c 6f 61 64 69 |er segme|nt loadi|
|000017e0| 6e 67 20 65 76 65 6e 74 | 73 2e 0d 53 74 72 61 74 |ng event|s..Strat|
|000017f0| 65 67 69 65 73 0d 4f 6e | 65 20 73 74 72 61 74 65 |egies.On|e strate|
|00001800| 67 79 20 66 6f 72 20 6f | 72 67 61 6e 69 7a 69 6e |gy for o|rganizin|
|00001810| 67 20 73 65 67 6d 65 6e | 74 73 20 69 73 20 62 61 |g segmen|ts is ba|
|00001820| 73 65 64 20 6f 6e 20 66 | 75 6e 63 74 69 6f 6e 61 |sed on f|unctiona|
|00001830| 6c 69 74 79 d1 66 75 6e | 63 74 69 6f 6e 73 20 74 |lity.fun|ctions t|
|00001840| 68 61 74 20 77 6f 72 6b | 20 74 6f 67 65 74 68 65 |hat work| togethe|
|00001850| 72 20 73 68 6f 75 6c 64 | 20 62 65 20 70 6c 61 63 |r should| be plac|
|00001860| 65 64 20 69 6e 20 74 68 | 65 20 73 61 6d 65 20 73 |ed in th|e same s|
|00001870| 65 67 6d 65 6e 74 20 28 | 73 65 65 20 72 65 61 73 |egment (|see reas|
|00001880| 6f 6e 20 64 65 66 69 6e | 65 64 20 65 61 72 6c 69 |on defin|ed earli|
|00001890| 65 72 29 2e 20 46 6f 72 | 20 65 78 61 6d 70 6c 65 |er). For| example|
|000018a0| 2c 20 77 65 20 6e 65 65 | 64 20 63 65 72 74 61 69 |, we nee|d certai|
|000018b0| 6e 20 72 6f 75 74 69 6e | 65 73 20 64 75 72 69 6e |n routin|es durin|
|000018c0| 67 20 61 6e 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |g an app|lication|
|000018d0| d5 73 20 69 6e 69 74 69 | 61 6c 69 7a 61 74 69 6f |.s initi|alizatio|
|000018e0| 6e 20 70 68 61 73 65 2c | 20 62 75 74 20 61 66 74 |n phase,| but aft|
|000018f0| 65 72 20 69 6e 69 74 69 | 61 6c 69 7a 61 74 69 6f |er initi|alizatio|
|00001900| 6e 20 69 73 20 63 6f 6d | 70 6c 65 74 65 20 74 68 |n is com|plete th|
|00001910| 65 79 20 63 61 6e 20 72 | 65 73 69 64 65 20 6f 6e |ey can r|eside on|
|00001920| 20 64 69 73 6b 20 75 6e | 74 69 6c 20 74 68 65 20 | disk un|til the |
|00001930| 6e 65 78 74 20 6c 61 75 | 6e 63 68 20 6f 66 20 74 |next lau|nch of t|
|00001940| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 2e 0d |he appli|cation..|
|00001950| 41 6e 6f 74 68 65 72 20 | 73 74 72 61 74 65 67 79 |Another |strategy|
|00001960| 20 69 73 20 74 6f 20 6f | 72 67 61 6e 69 7a 65 20 | is to o|rganize |
|00001970| 73 65 67 6d 65 6e 74 73 | 20 73 6f 20 74 68 65 79 |segments| so they|
|00001980| 20 61 72 65 20 61 73 20 | 73 6d 61 6c 6c 20 61 73 | are as |small as|
|00001990| 20 70 6f 73 73 69 62 6c | 65 2e 20 54 68 69 73 20 | possibl|e. This |
|000019a0| 6d 65 61 6e 73 20 74 68 | 61 74 20 74 68 65 20 61 |means th|at the a|
|000019b0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 68 65 61 70 20 |pplicati|on heap |
|000019c0| 77 69 6c 6c 20 63 6f 6e | 74 61 69 6e 20 6f 6e 6c |will con|tain onl|
|000019d0| 79 20 74 68 6f 73 65 20 | 73 65 67 6d 65 6e 74 73 |y those |segments|
|000019e0| 20 74 68 61 74 20 77 65 | 20 6e 65 65 64 2c 20 69 | that we| need, i|
|000019f0| 6e 63 72 65 61 73 69 6e | 67 20 74 68 65 20 61 6d |ncreasin|g the am|
|00001a00| 6f 75 6e 74 20 6f 66 20 | 61 70 70 6c 69 63 61 74 |ount of |applicat|
|00001a10| 69 6f 6e 20 68 65 61 70 | 20 61 76 61 69 6c 61 62 |ion heap| availab|
|00001a20| 6c 65 2e 20 54 68 65 20 | 70 72 6f 62 6c 65 6d 20 |le. The |problem |
|00001a30| 77 69 74 68 20 74 68 69 | 73 20 73 65 67 6d 65 6e |with thi|s segmen|
|00001a40| 74 61 74 69 6f 6e 20 73 | 74 72 61 74 65 67 79 20 |tation s|trategy |
|00001a50| 68 61 73 20 74 6f 20 64 | 6f 20 77 69 74 68 20 61 |has to d|o with a|
|00001a60| 6c 6c 20 74 68 65 20 53 | 65 67 6d 65 6e 74 20 4c |ll the S|egment L|
|00001a70| 6f 61 64 65 72 20 63 61 | 6c 6c 73 20 74 68 61 74 |oader ca|lls that|
|00001a80| 20 77 65 20 74 72 69 67 | 67 65 72 20 65 76 65 72 | we trig|ger ever|
|00001a90| 79 20 74 69 6d 65 20 61 | 20 66 75 6e 63 74 69 6f |y time a| functio|
|00001aa0| 6e 20 69 73 20 6e 6f 74 | 20 61 76 61 69 6c 61 62 |n is not| availab|
|00001ab0| 6c 65 20 69 6e 20 6d 65 | 6d 6f 72 79 2e 20 54 68 |le in me|mory. Th|
|00001ac0| 69 73 20 68 61 70 70 65 | 6e 73 20 6f 6e 6c 79 20 |is happe|ns only |
|00001ad0| 69 66 20 74 68 65 20 73 | 65 67 6d 65 6e 74 20 69 |if the s|egment i|
|00001ae0| 74 73 65 6c 66 20 69 73 | 20 6e 6f 74 20 69 6e 69 |tself is| not ini|
|00001af0| 74 69 61 6c 6c 79 20 6c | 6f 61 64 65 64 2e 20 4f |tially l|oaded. O|
|00001b00| 6e 63 65 20 61 20 73 65 | 67 6d 65 6e 74 20 69 73 |nce a se|gment is|
|00001b10| 20 6c 6f 61 64 65 64 2c | 20 69 74 20 69 73 20 6d | loaded,| it is m|
|00001b20| 61 72 6b 65 64 20 70 75 | 72 67 65 61 62 6c 65 20 |arked pu|rgeable |
|00001b30| 77 68 65 6e 20 6e 6f 74 | 20 75 73 65 64 20 62 79 |when not| used by|
|00001b40| 20 4d 61 63 41 70 70 2c | 20 61 6e 64 20 75 6e 6c | MacApp,| and unl|
|00001b50| 65 73 73 20 77 65 20 68 | 61 76 65 20 61 20 66 75 |ess we h|ave a fu|
|00001b60| 6c 6c 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 68 |ll appli|cation h|
|00001b70| 65 61 70 2c 20 74 68 65 | 20 73 65 67 6d 65 6e 74 |eap, the| segment|
|00001b80| 20 69 73 20 73 74 69 6c | 6c 20 70 72 65 73 65 6e | is stil|l presen|
|00001b90| 74 20 69 6e 20 6d 65 6d | 6f 72 79 2e 20 53 74 69 |t in mem|ory. Sti|
|00001ba0| 6c 6c 2c 20 69 66 20 77 | 65 20 6e 65 65 64 20 74 |ll, if w|e need t|
|00001bb0| 6f 20 6c 6f 61 64 20 61 | 20 6c 6f 74 20 6f 66 20 |o load a| lot of |
|00001bc0| 73 65 67 6d 65 6e 74 73 | 20 66 72 6f 6d 20 61 20 |segments| from a |
|00001bd0| 68 61 72 64 20 64 69 73 | 6b 2c 20 69 74 20 77 69 |hard dis|k, it wi|
|00001be0| 6c 6c 20 63 61 75 73 65 | 20 61 20 6c 6f 74 20 6f |ll cause| a lot o|
|00001bf0| 66 20 64 69 73 6b 20 73 | 70 69 6e 6e 69 6e 67 20 |f disk s|pinning |
|00001c00| 69 6e 20 74 68 65 20 63 | 61 73 65 20 6f 66 20 70 |in the c|ase of p|
|00001c10| 6f 72 74 61 62 6c 65 73 | 2e 20 41 6e 64 20 65 6e |ortables|. And en|
|00001c20| 64 20 75 73 65 72 73 20 | 64 6f 6e d5 74 20 6c 69 |d users |don.t li|
|00001c30| 6b 65 20 64 69 73 6b 73 | 20 74 68 61 74 20 73 70 |ke disks| that sp|
|00001c40| 69 6e 2c 20 62 65 63 61 | 75 73 65 20 74 68 65 79 |in, beca|use they|
|00001c50| 20 64 65 63 72 65 61 73 | 65 20 74 68 65 20 62 61 | decreas|e the ba|
|00001c60| 74 74 65 72 79 20 6c 69 | 66 65 74 69 6d 65 2e 0d |ttery li|fetime..|
|00001c70| 48 6f 77 20 74 6f 20 53 | 65 67 6d 65 6e 74 20 4d |How to S|egment M|
|00001c80| 61 63 41 70 70 20 43 6f | 64 65 0d 54 68 65 20 73 |acApp Co|de.The s|
|00001c90| 74 72 61 74 65 67 79 20 | 70 72 65 73 65 6e 74 65 |trategy |presente|
|00001ca0| 64 20 62 65 6c 6f 77 20 | 69 73 20 61 20 67 75 69 |d below |is a gui|
|00001cb0| 64 65 6c 69 6e 65 20 74 | 6f 20 4d 61 63 41 70 70 |deline t|o MacApp|
|00001cc0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 73 65 67 | applica|tion seg|
|00001cd0| 6d 65 6e 74 61 74 69 6f | 6e 2c 20 62 75 74 20 69 |mentatio|n, but i|
|00001ce0| 74 20 73 68 6f 75 6c 64 | 20 6e 6f 74 20 62 65 20 |t should| not be |
|00001cf0| 74 61 6b 65 6e 20 61 73 | 20 61 20 70 72 69 6d 65 |taken as| a prime|
|00001d00| 20 64 69 72 65 63 74 69 | 76 65 2e 20 48 6f 77 65 | directi|ve. Howe|
|00001d10| 76 65 72 2c 20 61 73 20 | 74 68 69 73 20 69 73 20 |ver, as |this is |
|00001d20| 74 68 65 20 63 75 72 72 | 65 6e 74 20 4d 61 63 41 |the curr|ent MacA|
|00001d30| 70 70 20 73 74 72 61 74 | 65 67 79 20 69 74 20 69 |pp strat|egy it i|
|00001d40| 73 20 6e 6f 74 20 72 65 | 61 6c 6c 79 20 66 65 61 |s not re|ally fea|
|00001d50| 73 69 62 6c 65 20 74 6f | 20 75 73 65 20 61 6e 79 |sible to| use any|
|00001d60| 20 6f 74 68 65 72 20 61 | 6c 74 65 72 6e 61 74 65 | other a|lternate|
|00001d70| 20 73 65 67 6d 65 6e 74 | 61 74 69 6f 6e 20 73 74 | segment|ation st|
|00001d80| 72 61 74 65 67 69 65 73 | 20 77 69 74 68 20 4d 61 |rategies| with Ma|
|00001d90| 63 41 70 70 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |cApp app|lication|
|00001da0| 73 2c 20 62 65 63 61 75 | 73 65 20 4d 61 63 41 70 |s, becau|se MacAp|
|00001db0| 70 20 77 69 6c 6c 20 62 | 65 20 61 20 62 69 67 20 |p will b|e a big |
|00001dc0| 70 61 72 74 20 6f 66 20 | 74 68 65 20 61 70 70 6c |part of |the appl|
|00001dd0| 69 63 61 74 69 6f 6e 20 | 63 6f 64 65 2e 20 48 6f |ication |code. Ho|
|00001de0| 77 65 76 65 72 2c 20 66 | 65 65 6c 20 66 72 65 65 |wever, f|eel free|
|00001df0| 20 74 6f 20 65 78 70 65 | 72 69 6d 65 6e 74 20 61 | to expe|riment a|
|00001e00| 6e 64 20 74 65 73 74 20 | 77 69 74 68 20 74 68 65 |nd test |with the|
|00001e10| 20 6f 74 68 65 72 20 61 | 6c 74 65 72 6e 61 74 69 | other a|lternati|
|00001e20| 76 65 d1 73 6d 61 6c 6c | 20 43 4f 44 45 20 73 65 |ve.small| CODE se|
|00001e30| 67 6d 65 6e 74 73 d1 69 | 6e 20 63 6f 64 65 20 74 |gments.i|n code t|
|00001e40| 68 61 74 20 79 6f 75 20 | 63 6f 6e 74 72 6f 6c 2e |hat you |control.|
|00001e50| 0d 54 68 65 20 4d 61 63 | 41 70 70 20 73 74 72 61 |.The Mac|App stra|
|00001e60| 74 65 67 79 20 69 73 20 | 62 61 73 65 64 20 6f 6e |tegy is |based on|
|00001e70| 20 66 75 6e 63 74 69 6f | 6e 61 6c 20 67 72 6f 75 | functio|nal grou|
|00001e80| 70 69 6e 67 73 2c 20 77 | 68 65 72 65 20 66 75 6e |pings, w|here fun|
|00001e90| 63 74 69 6f 6e 73 20 72 | 65 6c 61 74 65 64 20 74 |ctions r|elated t|
|00001ea0| 6f 20 65 61 63 68 20 6f | 74 68 65 72 20 28 74 68 |o each o|ther (th|
|00001eb0| 65 79 20 63 61 6c 6c 20 | 65 61 63 68 20 6f 74 68 |ey call |each oth|
|00001ec0| 65 72 29 20 61 72 65 20 | 70 6c 61 63 65 64 20 69 |er) are |placed i|
|00001ed0| 6e 20 74 68 65 20 73 61 | 6d 65 20 73 65 67 6d 65 |n the sa|me segme|
|00001ee0| 6e 74 2e 20 54 68 65 20 | 66 75 6e 63 74 69 6f 6e |nt. The |function|
|00001ef0| 61 6c 20 67 72 6f 75 70 | 69 6e 67 20 69 73 3a 0d |al group|ing is:.|
|00001f00| 09 53 45 47 4d 45 4e 54 | 20 4e 41 4d 45 09 09 09 |.SEGMENT| NAME...|
|00001f10| 55 53 45 0d 4d 61 69 6e | 20 09 4d 61 69 6e 20 72 |USE.Main| .Main r|
|00001f20| 65 73 69 64 65 6e 74 20 | 73 65 67 6d 65 6e 74 2c |esident |segment,|
|00001f30| 20 77 69 6c 6c 20 63 6f | 6e 74 61 69 6e 20 63 6f | will co|ntain co|
|00001f40| 6d 6d 6f 6e 20 63 6f 64 | 65 20 28 6c 69 62 72 61 |mmon cod|e (libra|
|00001f50| 72 69 65 73 20 75 73 75 | 61 6c 6c 79 29 2e 09 0d |ries usu|ally)...|
|00001f60| 41 52 65 73 20 09 52 6f | 75 74 69 6e 65 73 20 79 |ARes .Ro|utines y|
|00001f70| 6f 75 20 63 61 6c 6c 20 | 6f 66 74 65 6e 2c 20 6f |ou call |often, o|
|00001f80| 72 20 72 65 73 69 64 65 | 6e 74 20 72 6f 75 74 69 |r reside|nt routi|
|00001f90| 6e 65 73 2e 0d 44 6f 53 | 65 74 75 70 4d 65 6e 75 |nes..DoS|etupMenu|
|00001fa0| 73 0d 44 6f 53 65 74 43 | 75 72 73 6f 72 0d 44 6f |s.DoSetC|ursor.Do|
|00001fb0| 49 64 6c 65 0d 44 72 61 | 77 0d 44 6f 4b 65 79 43 |Idle.Dra|w.DoKeyC|
|00001fc0| 6f 6d 6d 61 6e 64 73 20 | 28 69 66 20 74 79 70 69 |ommands |(if typi|
|00001fd0| 6e 67 29 09 0d 41 4e 6f | 6e 52 65 73 09 46 6f 72 |ng)..ANo|nRes.For|
|00001fe0| 20 72 6f 75 74 69 6e 65 | 73 20 79 6f 75 20 72 61 | routine|s you ra|
|00001ff0| 72 65 6c 79 20 63 61 6c | 6c 2c 20 6f 72 20 6e 6f |rely cal|l, or no|
|00002000| 6e 72 65 73 69 64 65 6e | 74 20 72 6f 75 74 69 6e |nresiden|t routin|
|00002010| 65 73 2e 09 0d 41 44 65 | 62 75 67 09 44 65 62 75 |es...ADe|bug.Debu|
|00002020| 67 67 69 6e 67 20 63 6f | 64 65 2e 09 0d 41 49 6e |gging co|de...AIn|
|00002030| 69 74 09 46 75 6e 63 74 | 69 6f 6e 73 20 75 73 65 |it.Funct|ions use|
|00002040| 64 20 6f 6e 6c 79 20 6f | 6e 63 65 20 69 6e 20 74 |d only o|nce in t|
|00002050| 68 65 20 70 72 6f 67 72 | 61 6d 2e 0d 49 59 6f 75 |he progr|am..IYou|
|00002060| 72 41 70 70 6c 69 63 61 | 74 69 6f 6e 0d 49 6e 69 |rApplica|tion.Ini|
|00002070| 74 69 61 6c 69 7a 65 0d | 44 6f 50 6f 73 74 43 72 |tialize.|DoPostCr|
|00002080| 65 61 74 65 09 0d 41 54 | 65 72 6d 69 6e 61 74 65 |eate..AT|erminate|
|00002090| 09 46 75 6e 63 74 69 6f | 6e 73 20 75 73 65 64 20 |.Functio|ns used |
|000020a0| 6f 6e 6c 79 20 77 68 65 | 6e 20 79 6f 75 20 71 75 |only whe|n you qu|
|000020b0| 69 74 20 74 68 65 20 61 | 70 70 6c 69 63 61 74 69 |it the a|pplicati|
|000020c0| 6f 6e 2e 09 0d 41 53 65 | 6c 43 6f 6d 6d 61 6e 64 |on...ASe|lCommand|
|000020d0| 09 46 6f 72 20 73 65 6c | 65 63 74 69 6e 67 20 63 |.For sel|ecting c|
|000020e0| 6f 6d 6d 61 6e 64 73 20 | 28 54 43 6f 6d 6d 61 6e |ommands |(TComman|
|000020f0| 64 29 2e 0d 44 6f 4d 65 | 6e 75 43 6f 6d 6d 61 6e |d)..DoMe|nuComman|
|00002100| 64 0d 44 6f 4d 6f 75 73 | 65 43 6f 6d 6d 61 6e 64 |d.DoMous|eCommand|
|00002110| 0d 44 6f 4b 65 79 43 6f | 6d 6d 61 6e 64 20 28 69 |.DoKeyCo|mmand (i|
|00002120| 66 20 6e 6f 74 20 74 79 | 70 69 6e 67 29 0d 54 59 |f not ty|ping).TY|
|00002130| 6f 75 72 50 61 73 74 65 | 43 6f 6d 6d 61 6e 64 0d |ourPaste|Command.|
|00002140| 49 59 6f 75 72 43 6f 6d | 6d 61 6e 64 09 0d 41 44 |IYourCom|mand..AD|
|00002150| 6f 43 6f 6d 6d 61 6e 64 | 09 46 6f 72 20 70 65 72 |oCommand|.For per|
|00002160| 66 6f 72 6d 69 6e 67 20 | 63 6f 6d 6d 61 6e 64 73 |forming |commands|
|00002170| 2c 20 6c 69 6b 65 20 54 | 43 6f 6d 6d 61 6e 64 20 |, like T|Command |
|00002180| 6f 62 6a 65 63 74 73 2e | 0d 54 52 65 63 6f 6c 6f |objects.|.TRecolo|
|00002190| 72 43 6d 64 3a 3a 44 6f | 69 74 0d 54 53 6b 65 74 |rCmd::Do|it.TSket|
|000021a0| 63 68 65 72 3a 3a 54 72 | 61 63 6b 4d 6f 75 73 65 |cher::Tr|ackMouse|
|000021b0| 0d 54 54 79 70 69 6e 67 | 43 6d 64 3a 43 6f 6d 6d |.TTyping|Cmd:Comm|
|000021c0| 69 74 09 0d 41 43 6c 69 | 70 42 6f 61 72 64 09 46 |it..ACli|pBoard.F|
|000021d0| 6f 72 20 43 6c 69 70 62 | 6f 61 72 64 20 6e 6f 6e |or Clipb|oard non|
|000021e0| 63 6f 6d 6d 61 6e 64 73 | 2e 0d 4d 61 6b 65 56 69 |commands|..MakeVi|
|000021f0| 65 77 46 6f 72 41 6c 69 | 65 6e 43 6c 69 70 62 6f |ewForAli|enClipbo|
|00002200| 61 72 64 0d 47 69 76 65 | 50 61 73 74 65 44 61 74 |ard.Give|PasteDat|
|00002210| 61 0d 57 72 69 74 65 54 | 6f 44 65 73 6b 53 63 72 |a.WriteT|oDeskScr|
|00002220| 61 70 09 0d 41 4f 70 65 | 6e 09 4f 70 65 6e 69 6e |ap..AOpe|n.Openin|
|00002230| 67 20 64 6f 63 75 6d 65 | 6e 74 73 20 61 6e 64 20 |g docume|nts and |
|00002240| 64 61 74 61 20 73 74 72 | 75 63 74 75 72 65 73 2e |data str|uctures.|
|00002250| 0d 44 6f 4d 61 6b 65 56 | 69 65 77 73 0d 44 6f 4d |.DoMakeV|iews.DoM|
|00002260| 61 6b 65 57 69 6e 64 6f | 77 73 0d 49 59 6f 75 72 |akeWindo|ws.IYour|
|00002270| 44 6f 63 75 6d 65 6e 74 | 0d 44 6f 4d 61 6b 65 44 |Document|.DoMakeD|
|00002280| 6f 63 75 6d 65 6e 74 0d | 49 59 6f 75 72 56 69 65 |ocument.|IYourVie|
|00002290| 77 09 0d 41 43 6c 6f 73 | 65 09 43 6c 6f 73 69 6e |w..AClos|e.Closin|
|000022a0| 67 20 64 6f 63 75 6d 65 | 6e 74 73 20 61 6e 64 20 |g docume|nts and |
|000022b0| 64 61 74 61 20 73 74 72 | 75 63 74 75 72 65 73 2e |data str|uctures.|
|000022c0| 09 0d 41 52 65 61 64 46 | 69 6c 65 09 52 65 61 64 |..AReadF|ile.Read|
|000022d0| 69 6e 67 20 66 72 6f 6d | 20 64 69 73 6b 2e 0d 44 |ing from| disk..D|
|000022e0| 6f 52 65 61 64 0d 44 6f | 49 6e 69 74 69 61 6c 53 |oRead.Do|InitialS|
|000022f0| 74 61 74 65 09 0d 41 57 | 72 69 74 65 46 69 6c 65 |tate..AW|riteFile|
|00002300| 09 53 61 76 69 6e 67 20 | 66 69 6c 65 73 20 74 6f |.Saving |files to|
|00002310| 20 64 69 73 6b 2e 0d 44 | 6f 4e 65 65 64 44 69 73 | disk..D|oNeedDis|
|00002320| 6b 53 70 61 63 65 0d 44 | 6f 57 72 69 74 65 09 0d |kSpace.D|oWrite..|
|00002330| 41 46 69 6c 65 09 54 46 | 69 6c 65 20 62 61 73 65 |AFile.TF|ile base|
|00002340| 64 20 66 75 6e 63 74 69 | 6f 6e 73 2c 20 72 61 72 |d functi|ons, rar|
|00002350| 65 6c 79 20 75 73 65 64 | 2e 09 0d 43 6f 6e 73 74 |ely used|...Const|
|00002360| 72 75 63 74 6f 72 52 65 | 73 09 45 6d 70 74 79 20 |ructorRe|s.Empty |
|00002370| 63 6f 6e 73 74 72 75 63 | 74 6f 72 73 20 28 74 68 |construc|tors (th|
|00002380| 6f 73 65 20 74 68 61 74 | 20 61 72 65 20 6e 6f 74 |ose that| are not|
|00002390| 20 75 73 65 64 20 62 79 | 20 4d 61 63 41 70 70 2e | used by| MacApp.|
|000023a0| 20 53 74 61 63 6b 20 62 | 61 73 65 64 20 63 6c 61 | Stack b|ased cla|
|000023b0| 73 73 65 73 20 74 68 61 | 74 20 68 61 76 65 20 77 |sses tha|t have w|
|000023c0| 6f 72 6b 69 6e 67 20 63 | 6f 6e 73 74 72 75 63 74 |orking c|onstruct|
|000023d0| 6f 72 73 20 73 68 6f 75 | 6c 64 20 62 65 20 70 6c |ors shou|ld be pl|
|000023e0| 61 63 65 64 20 69 6e 20 | 74 68 65 20 73 61 6d 65 |aced in |the same|
|000023f0| 20 73 65 67 6d 65 6e 74 | 20 61 73 20 74 68 65 20 | segment| as the |
|00002400| 49 3c 6d 65 74 68 6f 64 | 3e 20 6f 72 20 74 68 65 |I<method|> or the|
|00002410| 20 49 6e 69 74 69 61 6c | 69 7a 65 20 6d 65 74 68 | Initial|ize meth|
|00002420| 6f 64 2e 09 0d 49 74 65 | 72 61 74 6f 72 52 65 73 |od...Ite|ratorRes|
|00002430| 09 4d 61 63 41 70 70 20 | 69 74 65 72 61 74 6f 72 |.MacApp |iterator|
|00002440| 73 2e 09 0d 4d 41 44 65 | 62 75 67 67 65 72 09 4d |s...MADe|bugger.M|
|00002450| 61 63 41 70 70 20 64 65 | 62 75 67 67 69 6e 67 20 |acApp de|bugging |
|00002460| 63 6f 64 65 20 28 63 6f | 64 65 20 67 65 6e 65 72 |code (co|de gener|
|00002470| 61 74 65 64 20 62 79 20 | 71 44 65 62 75 67 2c 20 |ated by |qDebug, |
|00002480| 71 55 73 65 72 46 6c 61 | 67 5b 31 2d 33 5d 29 2e |qUserFla|g[1-3]).|
|00002490| 09 0d 0d 4d 61 63 41 70 | 70 20 68 61 73 20 66 61 |...MacAp|p has fa|
|000024a0| 72 20 6d 6f 72 65 20 73 | 65 67 6d 65 6e 74 73 2e |r more s|egments.|
|000024b0| 20 57 65 20 72 65 63 6f | 6d 6d 65 6e 64 20 74 68 | We reco|mmend th|
|000024c0| 61 74 20 79 6f 75 20 64 | 6f 20 61 20 73 65 61 72 |at you d|o a sear|
|000024d0| 63 68 20 6f 66 20 74 68 | 65 20 22 70 72 61 67 6d |ch of th|e "pragm|
|000024e0| 61 20 73 65 67 6d 65 6e | 74 22 20 73 74 72 69 6e |a segmen|t" strin|
|000024f0| 67 20 69 6e 20 74 68 65 | 20 4d 61 63 41 70 70 20 |g in the| MacApp |
|00002500| 6c 69 62 72 61 72 79 20 | 73 6f 75 72 63 65 73 20 |library |sources |
|00002510| 74 6f 20 67 65 74 20 74 | 68 65 20 77 68 6f 6c 65 |to get t|he whole|
|00002520| 20 70 69 63 74 75 72 65 | 20 6f 66 20 77 68 61 74 | picture| of what|
|00002530| 20 66 75 6e 63 74 69 6f | 6e 20 67 72 6f 75 70 69 | functio|n groupi|
|00002540| 6e 67 73 20 4d 61 63 41 | 70 70 20 75 73 65 73 2e |ngs MacA|pp uses.|
|00002550| 20 4f 72 20 75 73 65 20 | 4d 61 63 42 72 6f 77 73 | Or use |MacBrows|
|00002560| 65 20 6f 72 20 61 20 73 | 69 6d 69 6c 61 72 20 62 |e or a s|imilar b|
|00002570| 72 6f 77 73 65 72 20 74 | 68 61 74 20 73 68 6f 77 |rowser t|hat show|
|00002580| 73 20 73 65 67 6d 65 6e | 74 61 74 69 6f 6e 20 69 |s segmen|tation i|
|00002590| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 66 6f 72 20 65 |nformati|on for e|
|000025a0| 61 63 68 20 6d 65 74 68 | 6f 64 20 69 6e 20 74 68 |ach meth|od in th|
|000025b0| 65 20 66 72 61 6d 65 77 | 6f 72 6b 2e 20 46 6f 72 |e framew|ork. For|
|000025c0| 20 69 6e 73 74 61 6e 63 | 65 2c 20 69 66 20 79 6f | instanc|e, if yo|
|000025d0| 75 20 77 72 69 74 65 20 | 54 41 70 70 6c 65 45 76 |u write |TAppleEv|
|000025e0| 65 6e 74 2d 62 61 73 65 | 64 20 6d 65 6d 62 65 72 |ent-base|d member|
|000025f0| 20 66 75 6e 63 74 69 6f | 6e 73 2c 20 63 68 65 63 | functio|ns, chec|
|00002600| 6b 20 74 68 65 20 55 41 | 70 70 6c 65 45 76 65 6e |k the UA|ppleEven|
|00002610| 74 73 2e 63 70 20 66 69 | 6c 65 20 74 6f 20 73 65 |ts.cp fi|le to se|
|00002620| 65 20 77 68 65 72 65 20 | 76 61 72 69 6f 75 73 20 |e where |various |
|00002630| 54 41 70 70 6c 65 45 76 | 65 6e 74 20 6d 65 6d 62 |TAppleEv|ent memb|
|00002640| 65 72 20 66 75 6e 63 74 | 69 6f 6e 73 20 61 72 65 |er funct|ions are|
|00002650| 20 70 6c 61 63 65 64 2e | 20 49 66 20 79 6f 75 20 | placed.| If you |
|00002660| 6f 76 65 72 72 69 64 65 | 20 61 6e 79 20 6f 66 20 |override| any of |
|00002670| 74 68 65 6d 2c 20 6d 61 | 6b 65 20 73 75 72 65 20 |them, ma|ke sure |
|00002680| 74 68 61 74 20 79 6f 75 | 20 70 6c 61 63 65 20 74 |that you| place t|
|00002690| 68 65 20 6f 76 65 72 72 | 69 64 64 65 6e 20 6d 65 |he overr|idden me|
|000026a0| 74 68 6f 64 20 69 6e 20 | 74 68 65 20 73 61 6d 65 |thod in |the same|
|000026b0| 20 73 65 67 6d 65 6e 74 | 20 61 73 20 74 68 65 20 | segment| as the |
|000026c0| 6f 72 69 67 69 6e 61 6c | 20 6f 6e 65 2e 20 46 6f |original| one. Fo|
|000026d0| 72 20 69 6e 73 74 61 6e | 63 65 20 73 6f 6d 65 20 |r instan|ce some |
|000026e0| 6f 66 20 74 68 65 20 41 | 70 70 6c 65 20 65 76 65 |of the A|pple eve|
|000026f0| 6e 74 d0 72 65 6c 61 74 | 65 64 20 66 75 6e 63 74 |nt.relat|ed funct|
|00002700| 69 6f 6e 73 20 61 6e 64 | 20 6d 65 74 68 6f 64 73 |ions and| methods|
|00002710| 20 73 68 6f 75 6c 64 20 | 62 65 20 70 6c 61 63 65 | should |be place|
|00002720| 64 20 69 6e 20 72 65 73 | 69 64 65 6e 74 20 73 65 |d in res|ident se|
|00002730| 67 6d 65 6e 74 73 3b 20 | 6f 74 68 65 72 77 69 73 |gments; |otherwis|
|00002740| 65 20 79 6f 75 20 63 6f | 75 6c 64 20 67 65 74 20 |e you co|uld get |
|00002750| 69 6e 74 6f 20 74 72 6f | 75 62 6c 65 2e 20 48 65 |into tro|uble. He|
|00002760| 72 65 20 4d 61 63 42 72 | 6f 77 73 65 20 61 6c 73 |re MacBr|owse als|
|00002770| 6f 20 67 69 76 65 73 20 | 67 6f 6f 64 20 73 75 70 |o gives |good sup|
|00002780| 70 6f 72 74 20 66 6f 72 | 20 61 20 71 75 69 63 6b |port for| a quick|
|00002790| 20 6c 6f 6f 6b 75 70 20 | 6f 66 20 73 65 67 6d 65 | lookup |of segme|
|000027a0| 6e 74 20 6e 61 6d 65 73 | 2e 0d 4f 74 68 65 72 20 |nt names|..Other |
|000027b0| 49 73 73 75 65 73 3a 0d | a5 20 55 6e 73 75 72 65 |Issues:.|. Unsure|
|000027c0| 20 61 62 6f 75 74 20 74 | 68 65 20 70 6c 61 63 65 | about t|he place|
|000027d0| 6d 65 6e 74 3f 0d 50 6c | 61 63 65 20 74 68 65 20 |ment?.Pl|ace the |
|000027e0| 6d 65 74 68 6f 64 20 69 | 6e 20 74 68 65 20 73 61 |method i|n the sa|
|000027f0| 6d 65 20 73 65 67 6d 65 | 6e 74 20 61 73 20 6f 74 |me segme|nt as ot|
|00002800| 68 65 72 20 6d 65 74 68 | 6f 64 73 20 74 68 61 74 |her meth|ods that|
|00002810| 20 63 61 6c 6c 20 69 74 | 2e 0d a5 20 53 74 61 63 | call it|... Stac|
|00002820| 6b 2d 62 61 73 65 64 20 | 43 2b 2b 20 63 6c 61 73 |k-based |C++ clas|
|00002830| 73 65 73 3f 0d 50 6c 61 | 63 65 20 74 68 65 20 6d |ses?.Pla|ce the m|
|00002840| 65 6d 62 65 72 20 66 75 | 6e 63 74 69 6f 6e 73 20 |ember fu|nctions |
|00002850| 6f 66 20 74 68 65 73 65 | 20 63 6c 61 73 73 65 73 |of these| classes|
|00002860| 20 69 6e 20 74 68 65 20 | 73 61 6d 65 20 73 65 67 | in the |same seg|
|00002870| 6d 65 6e 74 20 74 68 61 | 74 20 63 6f 72 72 65 73 |ment tha|t corres|
|00002880| 70 6f 6e 64 73 20 74 6f | 20 74 68 65 20 66 75 6e |ponds to| the fun|
|00002890| 63 74 69 6f 6e 61 6c 69 | 74 79 20 28 69 6e 20 74 |ctionali|ty (in t|
|000028a0| 68 65 20 73 61 6d 65 20 | 73 65 67 6d 65 6e 74 20 |he same |segment |
|000028b0| 61 73 20 74 68 65 20 72 | 6f 75 74 69 6e 65 20 6f |as the r|outine o|
|000028c0| 72 20 6d 65 6d 62 65 72 | 20 66 75 6e 63 74 69 6f |r member| functio|
|000028d0| 6e 20 74 68 61 74 20 75 | 73 65 20 74 68 65 6d 29 |n that u|se them)|
|000028e0| 2e 0d a5 20 57 44 45 46 | 73 2c 20 43 44 45 46 73 |... WDEF|s, CDEFs|
|000028f0| 2c 20 61 6e 64 20 73 69 | 6d 69 6c 61 72 20 63 6f |, and si|milar co|
|00002900| 64 65 20 73 65 67 6d 65 | 6e 74 73 d1 73 68 6f 75 |de segme|nts.shou|
|00002910| 6c 64 20 74 68 65 79 20 | 62 65 20 70 61 72 74 20 |ld they |be part |
|00002920| 6f 66 20 74 68 65 20 63 | 6c 61 73 73 20 73 65 67 |of the c|lass seg|
|00002930| 6d 65 6e 74 3f 0d 50 6c | 61 63 65 20 74 68 65 73 |ment?.Pl|ace thes|
|00002940| 65 20 43 4f 44 45 20 73 | 65 67 6d 65 6e 74 73 20 |e CODE s|egments |
|00002950| 69 6e 74 6f 20 74 68 65 | 20 4d 61 69 6e 20 73 65 |into the| Main se|
|00002960| 67 6d 65 6e 74 2e 20 54 | 68 69 73 20 69 73 20 62 |gment. T|his is b|
|00002970| 65 63 61 75 73 65 20 77 | 65 20 77 61 6e 74 20 74 |ecause w|e want t|
|00002980| 68 65 73 65 20 74 6f 20 | 62 65 20 61 6c 77 61 79 |hese to |be alway|
|00002990| 73 20 72 65 73 69 64 65 | 6e 74 20 69 6e 20 6d 65 |s reside|nt in me|
|000029a0| 6d 6f 72 79 20 66 6f 72 | 20 66 61 73 74 20 61 63 |mory for| fast ac|
|000029b0| 63 65 73 73 2e 0d 4e 6f | 74 65 3a 20 4d 6f 6e 69 |cess..No|te: Moni|
|000029c0| 74 6f 72 20 74 68 65 20 | 73 69 7a 65 20 6f 66 20 |tor the |size of |
|000029d0| 74 68 65 20 4d 61 69 6e | 20 73 65 67 6d 65 6e 74 |the Main| segment|
|000029e0| 2e 0d 27 72 65 73 21 27 | 20 61 6e 64 20 27 73 65 |..'res!'| and 'se|
|000029f0| 67 21 27 20 52 65 73 6f | 75 72 63 65 73 20 45 78 |g!' Reso|urces Ex|
|00002a00| 70 6c 61 69 6e 65 64 0d | 4d 61 63 41 70 70 20 70 |plained.|MacApp p|
|00002a10| 72 6f 67 72 61 6d 6d 65 | 72 73 20 73 6f 6d 65 74 |rogramme|rs somet|
|00002a20| 69 6d 65 73 20 77 69 6c | 6c 20 67 65 74 20 70 75 |imes wil|l get pu|
|00002a30| 7a 7a 6c 65 64 20 63 6f | 6e 63 65 72 6e 69 6e 67 |zzled co|ncerning|
|00002a40| 20 74 68 65 20 75 73 65 | 20 6f 66 20 27 72 65 73 | the use| of 'res|
|00002a50| 21 27 20 61 6e 64 20 27 | 73 65 67 21 27 20 72 65 |!' and '|seg!' re|
|00002a60| 73 6f 75 72 63 65 73 2e | 20 54 68 65 20 27 73 65 |sources.| The 'se|
|00002a70| 67 21 27 20 72 65 73 6f | 75 72 63 65 20 64 65 66 |g!' reso|urce def|
|00002a80| 69 6e 65 73 20 74 68 6f | 73 65 20 73 65 67 6d 65 |ines tho|se segme|
|00002a90| 6e 74 73 20 74 68 61 74 | 20 61 72 65 20 6c 6f 61 |nts that| are loa|
|00002aa0| 64 65 64 20 69 6e 74 6f | 20 6d 65 6d 6f 72 79 20 |ded into| memory |
|00002ab0| 77 68 65 6e 20 74 68 65 | 20 70 72 6f 67 72 61 6d |when the| program|
|00002ac0| 20 69 73 20 6d 61 6b 69 | 6e 67 20 6d 61 78 69 6d | is maki|ng maxim|
|00002ad0| 75 6d 20 75 73 65 20 6f | 66 20 6d 65 6d 6f 72 79 |um use o|f memory|
|00002ae0| 2e 20 4d 61 63 41 70 70 | 20 75 73 65 73 20 74 68 |. MacApp| uses th|
|00002af0| 69 73 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 77 |is infor|mation w|
|00002b00| 68 65 6e 20 6b 65 65 70 | 69 6e 67 20 74 72 61 63 |hen keep|ing trac|
|00002b10| 6b 20 6f 66 20 74 68 65 | 20 63 6f 64 65 20 72 65 |k of the| code re|
|00002b20| 73 65 72 76 65 20 74 6f | 20 65 6e 73 75 72 65 20 |serve to| ensure |
|00002b30| 74 68 65 72 65 20 69 73 | 20 72 6f 6f 6d 20 66 6f |there is| room fo|
|00002b40| 72 20 74 68 65 20 27 73 | 65 67 21 27 20 63 6f 64 |r the 's|eg!' cod|
|00002b50| 65 20 73 65 67 6d 65 6e | 74 73 20 61 74 20 74 68 |e segmen|ts at th|
|00002b60| 65 20 6d 61 78 69 6d 75 | 6d 20 70 6f 69 6e 74 20 |e maximu|m point |
|00002b70| 6f 66 20 6d 65 6d 6f 72 | 79 20 75 73 65 2e 20 53 |of memor|y use. S|
|00002b80| 65 65 20 43 68 61 70 74 | 65 72 20 36 20 6f 66 20 |ee Chapt|er 6 of |
|00002b90| 74 68 65 20 47 75 69 64 | 65 20 74 6f 20 4d 61 63 |the Guid|e to Mac|
|00002ba0| 41 70 70 20 54 6f 6f 6c | 73 20 63 6f 6e 63 65 72 |App Tool|s concer|
|00002bb0| 6e 69 6e 67 20 64 69 73 | 63 75 73 73 69 6f 6e 20 |ning dis|cussion |
|00002bc0| 6f 66 20 6d 61 78 69 6d | 75 6d 20 75 73 65 20 6f |of maxim|um use o|
|00002bd0| 66 20 6d 65 6d 6f 72 79 | 2e 0d 54 68 65 20 27 72 |f memory|..The 'r|
|00002be0| 65 73 21 27 20 72 65 73 | 6f 75 72 63 65 20 64 65 |es!' res|ource de|
|00002bf0| 66 69 6e 65 73 20 74 68 | 6f 73 65 20 73 65 67 6d |fines th|ose segm|
|00002c00| 65 6e 74 73 20 74 68 61 | 74 20 61 72 65 20 61 6c |ents tha|t are al|
|00002c10| 77 61 79 73 20 72 65 73 | 69 64 65 6e 74 20 69 6e |ways res|ident in|
|00002c20| 20 74 68 65 20 68 65 61 | 70 2e 20 28 53 65 67 6d | the hea|p. (Segm|
|00002c30| 65 6e 74 73 20 61 72 65 | 20 6d 61 64 65 20 70 65 |ents are| made pe|
|00002c40| 72 6d 61 6e 65 6e 74 6c | 79 20 72 65 73 69 64 65 |rmanentl|y reside|
|00002c50| 6e 74 20 76 69 61 20 61 | 20 67 6c 6f 62 61 6c 20 |nt via a| global |
|00002c60| 66 75 6e 63 74 69 6f 6e | 20 63 61 6c 6c 65 64 20 |function| called |
|00002c70| 53 65 74 52 65 73 69 64 | 65 6e 74 53 65 67 6d 65 |SetResid|entSegme|
|00002c80| 6e 74 2e 29 0d 4f 6e 65 | 20 75 73 65 20 66 6f 72 |nt.).One| use for|
|00002c90| 20 6d 61 6b 69 6e 67 20 | 73 65 67 6d 65 6e 74 73 | making |segments|
|00002ca0| 20 70 65 72 6d 61 6e 65 | 6e 74 6c 79 20 72 65 73 | permane|ntly res|
|00002cb0| 69 64 65 6e 74 20 69 73 | 20 66 6f 72 20 74 69 6d |ident is| for tim|
|00002cc0| 65 2d 63 72 69 74 69 63 | 61 6c 20 66 75 6e 63 74 |e-critic|al funct|
|00002cd0| 69 6f 6e 73 20 67 72 6f | 75 70 65 64 20 74 6f 67 |ions gro|uped tog|
|00002ce0| 65 74 68 65 72 20 69 6e | 20 61 20 73 70 65 63 69 |ether in| a speci|
|00002cf0| 61 6c 20 73 65 67 6d 65 | 6e 74 2e 20 54 68 75 73 |al segme|nt. Thus|
|00002d00| 2c 20 6c 6f 61 64 69 6e | 67 20 74 68 65 20 73 65 |, loadin|g the se|
|00002d10| 67 6d 65 6e 74 20 64 6f | 65 73 6e d5 74 20 72 65 |gment do|esn.t re|
|00002d20| 71 75 69 72 65 20 6f 76 | 65 72 68 65 61 64 20 69 |quire ov|erhead i|
|00002d30| 66 20 74 68 65 20 6d 65 | 74 68 6f 64 20 69 73 20 |f the me|thod is |
|00002d40| 73 75 64 64 65 6e 6c 79 | 20 6e 65 65 64 65 64 2e |suddenly| needed.|
|00002d50| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 77 65 | For exa|mple, we|
|00002d60| 20 63 6f 75 6c 64 20 75 | 73 65 20 74 68 69 73 20 | could u|se this |
|00002d70| 74 65 63 68 6e 69 71 75 | 65 20 74 6f 20 72 65 64 |techniqu|e to red|
|00002d80| 75 63 65 20 6f 76 65 72 | 68 65 61 64 20 66 6f 72 |uce over|head for|
|00002d90| 20 74 69 6d 65 2d 63 72 | 69 74 69 63 61 6c 20 63 | time-cr|itical c|
|00002da0| 6f 6d 6d 75 6e 69 63 61 | 74 69 6f 6e 20 6d 65 74 |ommunica|tion met|
|00002db0| 68 6f 64 73 2e 20 41 6c | 73 6f 2c 20 77 65 20 6d |hods. Al|so, we m|
|00002dc0| 69 67 68 74 20 68 61 76 | 65 20 66 75 6e 63 74 69 |ight hav|e functi|
|00002dd0| 6f 6e 73 20 74 68 61 74 | 20 61 72 65 20 63 61 6c |ons that| are cal|
|00002de0| 6c 65 64 20 64 75 72 69 | 6e 67 20 69 6e 74 65 72 |led duri|ng inter|
|00002df0| 72 75 70 74 20 74 69 6d | 65 20 74 68 61 74 20 61 |rupt tim|e that a|
|00002e00| 6c 77 61 79 73 20 6e 65 | 65 64 20 74 6f 20 62 65 |lways ne|ed to be|
|00002e10| 20 72 65 73 69 64 65 6e | 74 2e 0d 48 65 72 65 d5 | residen|t..Here.|
|00002e20| 73 20 61 6e 20 65 78 61 | 6d 70 6c 65 20 6f 66 20 |s an exa|mple of |
|00002e30| 61 20 27 72 65 73 21 27 | 20 72 65 73 6f 75 72 63 |a 'res!'| resourc|
|00002e40| 65 20 64 65 66 69 6e 65 | 64 20 69 6e 20 74 68 65 |e define|d in the|
|00002e50| 20 72 65 73 6f 75 72 63 | 65 20 66 69 6c 65 3a 0d | resourc|e file:.|
|00002e60| 72 65 73 6f 75 72 63 65 | 20 d5 72 65 73 21 27 20 |resource| .res!' |
|00002e70| 28 6b 4d 79 4d 61 63 41 | 70 70 2c 09 70 75 72 67 |(kMyMacA|pp,.purg|
|00002e80| 65 61 62 6c 65 29 20 7b | 0d 09 7b 09 d2 41 57 72 |eable) {|..{..AWr|
|00002e90| 69 74 65 43 6f 6e 6e d3 | 3b 0d 09 09 d2 41 52 65 |iteConn.|;....ARe|
|00002ea0| 61 64 43 6f 6e 6e d3 3b | 0d 09 09 d2 41 50 6f 6c |adConn.;|....APol|
|00002eb0| 6c d3 3b 0d 23 69 66 20 | 71 49 6e 73 70 65 63 74 |l.;.#if |qInspect|
|00002ec0| 6f 72 20 26 26 20 21 71 | 44 65 62 75 67 0d 09 09 |or && !q|Debug...|
|00002ed0| d2 47 44 65 62 75 67 43 | 6f 6e 6e d3 3b 0d 23 65 |.GDebugC|onn.;.#e|
|00002ee0| 6e 64 69 66 0d 23 69 66 | 20 71 50 65 72 66 6f 72 |ndif.#if| qPerfor|
|00002ef0| 6d 0d 09 09 d2 47 50 65 | 72 66 6f 72 6d 61 6e 63 |m....GPe|rformanc|
|00002f00| 65 43 6f 6d 6d 73 d3 3b | 0d 23 65 6e 64 69 66 0d |eComms.;|.#endif.|
|00002f10| 09 7d 3b 0d 7d 3b 0d 4d | 61 63 41 70 70 20 77 69 |.};.};.M|acApp wi|
|00002f20| 6c 6c 20 61 6c 73 6f 20 | 70 6c 61 63 65 20 69 6e |ll also |place in|
|00002f30| 74 65 72 6e 61 6c 20 74 | 72 61 70 20 70 61 74 63 |ternal t|rap patc|
|00002f40| 68 69 6e 67 20 63 6f 64 | 65 20 69 6e 20 72 65 73 |hing cod|e in res|
|00002f50| 69 64 65 6e 74 20 73 65 | 67 6d 65 6e 74 73 2c 20 |ident se|gments, |
|00002f60| 74 6f 20 61 76 6f 69 64 | 20 72 75 6e 74 69 6d 65 |to avoid| runtime|
|00002f70| 20 70 72 6f 62 6c 65 6d | 73 20 77 69 74 68 20 70 | problem|s with p|
|00002f80| 61 74 63 68 65 73 20 74 | 68 61 74 20 73 6f 6d 65 |atches t|hat some|
|00002f90| 20 65 6e 74 69 74 79 20 | 6d 69 67 68 74 20 73 75 | entity |might su|
|00002fa0| 64 64 65 6e 6c 79 20 75 | 6e 6c 6f 61 64 2e 20 54 |ddenly u|nload. T|
|00002fb0| 68 69 73 20 69 73 20 61 | 6c 73 6f 20 74 72 75 65 |his is a|lso true|
|00002fc0| 20 77 69 74 68 20 70 72 | 6f 67 72 61 6d 6d 65 72 | with pr|ogrammer|
|00002fd0| 2d 70 72 6f 76 69 64 65 | 64 20 74 72 61 70 20 70 |-provide|d trap p|
|00002fe0| 61 74 63 68 65 73 2e 0d | 55 6e 6c 6f 61 64 41 6c |atches..|UnloadAl|
|00002ff0| 6c 53 65 67 6d 65 6e 74 | 73 20 45 78 70 6c 61 69 |lSegment|s Explai|
|00003000| 6e 65 64 20 0d 54 68 65 | 20 4d 61 63 41 70 70 20 |ned .The| MacApp |
|00003010| 70 72 6f 67 72 61 6d 6d | 65 72 20 73 68 6f 75 6c |programm|er shoul|
|00003020| 64 20 62 65 20 61 77 61 | 72 65 20 74 68 61 74 20 |d be awa|re that |
|00003030| 73 65 67 6d 65 6e 74 73 | 20 6c 69 76 65 20 61 20 |segments| live a |
|00003040| 64 61 6e 67 65 72 6f 75 | 73 20 6c 69 66 65 20 69 |dangerou|s life i|
|00003050| 6e 73 69 64 65 20 74 68 | 65 20 4d 61 63 41 70 70 |nside th|e MacApp|
|00003060| 20 66 72 61 6d 65 77 6f | 72 6b 2e 20 55 6e 6c 65 | framewo|rk. Unle|
|00003070| 73 73 20 74 68 65 79 20 | 61 72 65 20 72 65 73 69 |ss they |are resi|
|00003080| 64 65 6e 74 2c 20 6f 72 | 20 6e 65 65 64 65 64 2c |dent, or| needed,|
|00003090| 20 74 68 65 79 20 61 72 | 65 20 70 75 72 67 65 64 | they ar|e purged|
|000030a0| 20 6f 75 74 2e 20 54 68 | 69 73 20 68 61 70 70 65 | out. Th|is happe|
|000030b0| 6e 73 20 62 6f 74 68 20 | 61 74 20 69 6e 69 74 69 |ns both |at initi|
|000030c0| 61 6c 69 7a 61 74 69 6f | 6e 20 74 69 6d 65 2c 20 |alizatio|n time, |
|000030d0| 61 73 20 77 65 6c 6c 20 | 61 73 20 64 75 72 69 6e |as well |as durin|
|000030e0| 67 20 74 68 65 20 6c 69 | 66 65 74 69 6d 65 20 6f |g the li|fetime o|
|000030f0| 66 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |f the ap|plicatio|
|00003100| 6e 2e 20 57 65 20 64 6f | 6e d5 74 20 77 61 6e 74 |n. We do|n.t want|
|00003110| 20 74 6f 20 68 61 76 65 | 20 73 65 67 6d 65 6e 74 | to have| segment|
|00003120| 73 20 66 6c 6f 61 74 69 | 6e 67 20 61 72 6f 75 6e |s floati|ng aroun|
|00003130| 64 20 69 6e 20 6d 65 6d | 6f 72 79 20 74 68 61 74 |d in mem|ory that|
|00003140| 20 77 65 20 6e 65 65 64 | 20 6f 6e 6c 79 20 64 75 | we need| only du|
|00003150| 72 69 6e 67 20 74 68 65 | 20 69 6e 69 74 69 61 6c |ring the| initial|
|00003160| 69 7a 61 74 69 6f 6e 20 | 70 68 61 73 65 20 6f 66 |ization |phase of|
|00003170| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00003180| 2e 20 4c 69 6b 65 77 69 | 73 65 2c 20 77 65 20 64 |. Likewi|se, we d|
|00003190| 6f 6e d5 74 20 77 61 6e | 74 20 74 6f 20 68 61 76 |on.t wan|t to hav|
|000031a0| 65 20 73 65 67 6d 65 6e | 74 73 20 69 6e 20 6d 65 |e segmen|ts in me|
|000031b0| 6d 6f 72 79 20 74 68 61 | 74 20 77 65 20 74 72 69 |mory tha|t we tri|
|000031c0| 67 67 65 72 20 76 65 72 | 79 20 66 65 77 20 74 69 |gger ver|y few ti|
|000031d0| 6d 65 73 20 64 75 72 69 | 6e 67 20 74 68 65 20 61 |mes duri|ng the a|
|000031e0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 6c 69 66 65 74 |pplicati|on lifet|
|000031f0| 69 6d 65 2e 0d 53 6f 20 | 77 68 6f 20 69 73 20 74 |ime..So |who is t|
|00003200| 61 6b 69 6e 67 20 63 61 | 72 65 20 6f 66 20 74 68 |aking ca|re of th|
|00003210| 65 20 73 65 67 6d 65 6e | 74 61 74 69 6f 6e 20 63 |e segmen|tation c|
|00003220| 6c 65 61 6e 75 70 3f 20 | 59 6f 75 72 20 6d 6f 74 |leanup? |Your mot|
|00003230| 68 65 72 3f 20 4e 6f 2c | 20 69 74 d5 73 20 61 20 |her? No,| it.s a |
|00003240| 67 6c 6f 62 61 6c 20 66 | 75 6e 63 74 69 6f 6e 20 |global f|unction |
|00003250| 63 61 6c 6c 65 64 20 55 | 6e 6c 6f 61 64 41 6c 6c |called U|nloadAll|
|00003260| 53 65 67 6d 65 6e 74 73 | 20 74 68 61 74 20 69 73 |Segments| that is|
|00003270| 20 63 61 6c 6c 65 64 20 | 62 6f 74 68 20 64 75 72 | called |both dur|
|00003280| 69 6e 67 20 74 68 65 20 | 69 6e 69 74 69 61 6c 69 |ing the |initiali|
|00003290| 7a 61 74 69 6f 6e 20 70 | 68 61 73 65 20 61 6e 64 |zation p|hase and|
|000032a0| 20 64 75 72 69 6e 67 20 | 74 68 65 20 69 64 6c 65 | during |the idle|
|000032b0| 20 74 69 6d 65 20 6f 66 | 20 74 68 65 20 61 70 70 | time of| the app|
|000032c0| 6c 69 63 61 74 69 6f 6e | 2e 20 49 74 20 69 73 20 |lication|. It is |
|000032d0| 61 6c 73 6f 20 74 72 69 | 67 67 65 72 65 64 20 77 |also tri|ggered w|
|000032e0| 68 65 6e 20 74 68 65 20 | 61 70 70 6c 69 63 61 74 |hen the |applicat|
|000032f0| 69 6f 6e 20 73 74 61 72 | 74 73 20 74 6f 20 68 61 |ion star|ts to ha|
|00003300| 76 65 20 6c 69 74 74 6c | 65 20 6d 65 6d 6f 72 79 |ve littl|e memory|
|00003310| 20 73 70 61 63 65 2e 20 | 55 6e 6c 6f 61 64 41 6c | space. |UnloadAl|
|00003320| 6c 53 65 67 6d 65 6e 74 | 73 20 70 75 72 67 65 73 |lSegment|s purges|
|00003330| 20 63 6f 64 65 20 73 65 | 67 6d 65 6e 74 73 20 66 | code se|gments f|
|00003340| 72 6f 6d 20 74 68 65 20 | 6d 65 6d 6f 72 79 20 75 |rom the |memory u|
|00003350| 6e 6c 65 73 73 20 74 68 | 65 79 20 61 72 65 20 6c |nless th|ey are l|
|00003360| 6f 63 6b 65 64 2c 20 69 | 6e 20 75 73 65 2c 20 6f |ocked, i|n use, o|
|00003370| 72 20 72 65 73 69 64 65 | 6e 74 20 28 73 70 65 63 |r reside|nt (spec|
|00003380| 69 66 69 65 64 20 69 6e | 20 74 68 65 20 72 65 73 |ified in| the res|
|00003390| 21 20 72 65 73 6f 75 72 | 63 65 29 2e 0d 48 6f 77 |! resour|ce)..How|
|000033a0| 65 76 65 72 2c 20 77 65 | 20 6d 69 67 68 74 20 68 |ever, we| might h|
|000033b0| 61 76 65 20 73 69 74 75 | 61 74 69 6f 6e 73 20 77 |ave situ|ations w|
|000033c0| 68 65 72 65 20 77 65 20 | 68 61 76 65 20 77 72 69 |here we |have wri|
|000033d0| 74 74 65 6e 20 63 6f 64 | 65 20 62 79 20 6d 69 73 |tten cod|e by mis|
|000033e0| 74 61 6b 65 20 73 6f 20 | 74 68 61 74 20 55 6e 6c |take so |that Unl|
|000033f0| 6f 61 64 41 6c 6c 53 65 | 67 6d 65 6e 74 73 20 77 |oadAllSe|gments w|
|00003400| 61 6e 74 73 20 73 75 64 | 64 65 6e 6c 79 20 74 6f |ants sud|denly to|
|00003410| 20 70 75 72 67 65 20 74 | 68 65 20 73 65 67 6d 65 | purge t|he segme|
|00003420| 6e 74 20 74 68 61 74 20 | 69 73 20 63 75 72 72 65 |nt that |is curre|
|00003430| 6e 74 6c 79 20 69 6e 20 | 75 73 65 2e 20 54 68 69 |ntly in |use. Thi|
|00003440| 73 20 66 75 6e 63 74 69 | 6f 6e 20 63 6f 75 6c 64 |s functi|on could|
|00003450| 20 75 6e 6c 6f 61 64 20 | 61 20 73 65 67 6d 65 6e | unload |a segmen|
|00003460| 74 20 63 6f 6e 74 61 69 | 6e 69 6e 67 20 61 20 6d |t contai|ning a m|
|00003470| 65 74 68 6f 64 20 74 68 | 61 74 20 79 6f 75 20 77 |ethod th|at you w|
|00003480| 69 6c 6c 20 72 65 74 75 | 72 6e 20 74 6f 20 6c 61 |ill retu|rn to la|
|00003490| 74 65 72 2e 20 59 6f 75 | 72 20 73 74 61 63 6b 20 |ter. You|r stack |
|000034a0| 63 75 72 72 65 6e 74 6c | 79 20 72 65 66 65 72 65 |currentl|y refere|
|000034b0| 6e 63 65 73 20 61 20 6d | 65 74 68 6f 64 20 63 6f |nces a m|ethod co|
|000034c0| 6e 74 61 69 6e 65 64 20 | 69 6e 20 74 68 65 20 73 |ntained |in the s|
|000034d0| 65 67 6d 65 6e 74 20 74 | 68 61 74 20 55 6e 6c 6f |egment t|hat Unlo|
|000034e0| 61 64 41 6c 6c 53 65 67 | 6d 65 6e 74 73 20 77 61 |adAllSeg|ments wa|
|000034f0| 6e 74 73 20 74 6f 20 75 | 6e 6c 6f 61 64 2e 20 44 |nts to u|nload. D|
|00003500| 61 6e 67 65 72 2c 20 64 | 61 6e 67 65 72 2e 20 0d |anger, d|anger. .|
|00003510| 4e 6f 77 2c 20 69 66 20 | 79 6f 75 20 68 61 76 65 |Now, if |you have|
|00003520| 20 53 6f 75 72 63 65 42 | 75 67 20 72 75 6e 6e 69 | SourceB|ug runni|
|00003530| 6e 67 20 69 6e 20 74 68 | 65 20 62 61 63 6b 67 72 |ng in th|e backgr|
|00003540| 6f 75 6e 64 2c 20 61 6e | 64 20 68 61 76 65 20 74 |ound, an|d have t|
|00003550| 68 65 20 77 61 72 6e 69 | 6e 67 20 66 6c 61 67 20 |he warni|ng flag |
|00003560| 69 6e 20 74 68 65 20 44 | 65 62 75 67 20 6d 65 6e |in the D|ebug men|
|00003570| 75 20 65 6e 74 72 79 20 | 73 65 74 20 66 6f 72 20 |u entry |set for |
|00003580| 75 6e 6c 6f 61 64 69 6e | 67 20 73 65 67 6d 65 6e |unloadin|g segmen|
|00003590| 74 73 2c 20 79 6f 75 20 | 77 69 6c 6c 20 67 65 74 |ts, you |will get|
|000035a0| 20 61 20 6e 69 63 65 20 | 6c 69 74 74 6c 65 20 77 | a nice |little w|
|000035b0| 61 72 6e 69 6e 67 20 66 | 72 6f 6d 20 55 6e 6c 6f |arning f|rom Unlo|
|000035c0| 61 64 41 6c 6c 53 65 67 | 6d 65 6e 74 73 20 62 65 |adAllSeg|ments be|
|000035d0| 66 6f 72 65 20 79 6f 75 | 20 67 65 74 20 69 6e 74 |fore you| get int|
|000035e0| 6f 20 74 68 65 20 62 69 | 6e 61 72 79 20 41 72 6d |o the bi|nary Arm|
|000035f0| 61 67 65 64 64 6f 6e c9 | 0d 44 65 76 65 6c 6f 70 |ageddon.|.Develop|
|00003600| 6d 65 6e 74 20 54 6f 6f | 6c 73 2c 20 4d 6f 64 65 |ment Too|ls, Mode|
|00003610| 6c 46 61 72 20 53 75 70 | 70 6f 72 74 0d 46 6f 72 |lFar Sup|port.For|
|00003620| 20 61 20 6c 6f 6e 67 20 | 74 69 6d 65 2c 20 73 65 | a long |time, se|
|00003630| 67 6d 65 6e 74 73 20 77 | 65 72 65 20 72 65 73 74 |gments w|ere rest|
|00003640| 72 69 63 74 65 64 20 74 | 6f 20 33 32 4b 20 73 69 |ricted t|o 32K si|
|00003650| 7a 65 73 20 64 75 65 20 | 74 6f 20 74 68 65 20 41 |zes due |to the A|
|00003660| 35 2d 72 65 6c 61 74 69 | 76 65 20 64 61 74 61 20 |5-relati|ve data |
|00003670| 72 65 66 65 72 65 6e 63 | 69 6e 67 20 77 69 74 68 |referenc|ing with|
|00003680| 20 31 36 2d 62 69 74 20 | 6f 66 66 73 65 74 73 2c | 16-bit |offsets,|
|00003690| 20 62 75 74 20 4d 50 57 | 20 33 2e 32 20 65 6c 69 | but MPW| 3.2 eli|
|000036a0| 6d 69 6e 61 74 65 73 20 | 74 68 69 73 20 33 32 4b |minates |this 32K|
|000036b0| 20 6c 69 6d 69 74 20 6f | 6e 20 73 65 67 6d 65 6e | limit o|n segmen|
|000036c0| 74 20 73 69 7a 65 20 76 | 69 61 20 6e 65 77 20 73 |t size v|ia new s|
|000036d0| 77 69 74 63 68 65 73 20 | 74 6f 20 74 68 65 20 63 |witches |to the c|
|000036e0| 6f 6d 70 69 6c 65 72 73 | 20 61 6e 64 20 74 68 65 |ompilers| and the|
|000036f0| 20 6c 69 6e 6b 65 72 2e | 20 0d 54 68 65 20 36 38 | linker.| .The 68|
|00003700| 30 32 30 20 69 6e 74 72 | 6f 64 75 63 65 64 20 33 |020 intr|oduced 3|
|00003710| 32 2d 62 69 74 20 50 43 | 2d 72 65 6c 61 74 69 76 |2-bit PC|-relativ|
|00003720| 65 20 62 72 61 6e 63 68 | 69 6e 67 20 28 42 53 52 |e branch|ing (BSR|
|00003730| 2e 4c 20 73 74 61 74 65 | 6d 65 6e 74 73 29 2c 20 |.L state|ments), |
|00003740| 62 75 74 20 74 68 61 74 | 20 64 69 64 6e d5 74 20 |but that| didn.t |
|00003750| 68 65 6c 70 20 74 68 65 | 20 43 6c 61 73 73 69 63 |help the| Classic|
|00003760| 20 61 6e 64 20 6f 74 68 | 65 72 20 36 38 30 30 30 | and oth|er 68000|
|00003770| 2d 62 61 73 65 64 20 4d | 61 63 69 6e 74 6f 73 68 |-based M|acintosh|
|00003780| 20 63 6f 6d 70 75 74 65 | 72 73 2e 20 49 6e 73 74 | compute|rs. Inst|
|00003790| 65 61 64 2c 20 4d 50 57 | 20 33 2e 32 20 6d 61 6b |ead, MPW| 3.2 mak|
|000037a0| 65 73 20 75 73 65 20 6f | 66 20 62 72 61 6e 63 68 |es use o|f branch|
|000037b0| 20 69 73 6c 61 6e 64 73 | 2e 20 54 68 69 73 20 73 | islands|. This s|
|000037c0| 69 6d 70 6c 65 2c 20 65 | 6c 65 67 61 6e 74 20 69 |imple, e|legant i|
|000037d0| 64 65 61 20 69 73 20 62 | 61 73 65 64 20 6f 6e 20 |dea is b|ased on |
|000037e0| 74 68 65 20 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |the impl|ementati|
|000037f0| 6f 6e 20 6f 66 20 50 43 | 2d 72 65 6c 61 74 69 76 |on of PC|-relativ|
|00003800| 65 20 63 6f 64 65 2d 74 | 6f 2d 63 6f 64 65 20 72 |e code-t|o-code r|
|00003810| 65 66 65 72 65 6e 63 65 | 73 2e 20 54 68 65 20 6c |eference|s. The l|
|00003820| 69 6e 6b 65 72 20 73 70 | 6c 69 74 73 20 61 20 6c |inker sp|lits a l|
|00003830| 61 72 67 65 20 63 6f 64 | 65 20 73 65 67 6d 65 6e |arge cod|e segmen|
|00003840| 74 20 75 70 20 69 6e 74 | 6f 20 73 6d 61 6c 6c 65 |t up int|o smalle|
|00003850| 72 20 33 32 4b 20 61 72 | 65 61 73 20 62 79 20 69 |r 32K ar|eas by i|
|00003860| 6e 73 65 72 74 69 6e 67 | 20 62 72 61 6e 63 68 20 |nserting| branch |
|00003870| 69 73 6c 61 6e 64 73 2e | 20 54 68 65 73 65 20 62 |islands.| These b|
|00003880| 72 61 6e 63 68 20 69 73 | 6c 61 6e 64 73 20 73 65 |ranch is|lands se|
|00003890| 72 76 65 20 61 73 20 69 | 6e 74 65 72 6d 65 64 69 |rve as i|ntermedi|
|000038a0| 61 74 65 20 70 6f 69 6e | 74 73 20 74 68 61 74 20 |ate poin|ts that |
|000038b0| 61 72 65 20 77 69 74 68 | 69 6e 20 72 61 6e 67 65 |are with|in range|
|000038c0| 20 6f 66 20 50 43 2d 72 | 65 6c 61 74 69 76 65 20 | of PC-r|elative |
|000038d0| 6a 75 6d 70 73 2c 20 74 | 68 75 73 20 6d 61 6b 69 |jumps, t|hus maki|
|000038e0| 6e 67 20 69 74 20 70 6f | 73 73 69 62 6c 65 20 74 |ng it po|ssible t|
|000038f0| 6f 20 6d 61 6b 65 20 61 | 20 63 61 6c 6c 20 61 63 |o make a| call ac|
|00003900| 72 6f 73 73 20 61 20 73 | 65 67 6d 65 6e 74 20 74 |ross a s|egment t|
|00003910| 68 61 74 20 77 6f 75 6c | 64 20 6f 74 68 65 72 77 |hat woul|d otherw|
|00003920| 69 73 65 20 72 65 73 75 | 6c 74 20 69 6e 20 61 20 |ise resu|lt in a |
|00003930| 6c 61 72 67 65 72 2d 74 | 68 61 6e 2d 33 32 4b 20 |larger-t|han-32K |
|00003940| 6a 75 6d 70 2e 0d 41 6e | 6f 74 68 65 72 20 6e 65 |jump..An|other ne|
|00003950| 77 20 66 65 61 74 75 72 | 65 20 69 73 20 d2 33 32 |w featur|e is .32|
|00003960| 2d 62 69 74 20 65 76 65 | 72 79 74 68 69 6e 67 2c |-bit eve|rything,|
|00003970| d3 20 77 68 69 63 68 20 | 74 72 61 6e 73 70 61 72 |. which |transpar|
|00003980| 65 6e 74 6c 79 20 72 65 | 6d 6f 76 65 73 20 74 68 |ently re|moves th|
|00003990| 65 20 6c 69 6d 69 74 61 | 74 69 6f 6e 73 20 6f 6e |e limita|tions on|
|000039a0| 20 63 6f 64 65 20 73 65 | 67 6d 65 6e 74 20 61 6e | code se|gment an|
|000039b0| 64 20 6a 75 6d 70 20 74 | 61 62 6c 65 20 73 69 7a |d jump t|able siz|
|000039c0| 65 73 20 61 6e 64 20 74 | 68 65 20 73 69 7a 65 20 |es and t|he size |
|000039d0| 6f 66 20 74 68 65 20 67 | 6c 6f 62 61 6c 20 64 61 |of the g|lobal da|
|000039e0| 74 61 20 61 72 65 61 73 | 2e 20 54 68 65 20 64 72 |ta areas|. The dr|
|000039f0| 61 77 62 61 63 6b 20 69 | 73 20 61 20 6c 61 72 67 |awback i|s a larg|
|00003a00| 65 72 20 63 6f 64 65 20 | 73 69 7a 65 20 66 6f 6f |er code |size foo|
|00003a10| 74 70 72 69 6e 74 20 61 | 6e 64 20 73 6f 6d 65 20 |tprint a|nd some |
|00003a20| 73 6c 6f 77 64 6f 77 6e | 20 64 75 65 20 74 6f 20 |slowdown| due to |
|00003a30| 69 6e 63 72 65 61 73 65 | 64 20 6c 6f 61 64 20 74 |increase|d load t|
|00003a40| 69 6d 65 20 66 6f 72 20 | 74 68 65 20 6c 61 72 67 |ime for |the larg|
|00003a50| 65 72 20 63 6f 64 65 20 | 73 65 67 6d 65 6e 74 73 |er code |segments|
|00003a60| 2e 20 42 75 74 20 68 65 | 79 2c 20 6c 6f 6f 6b 20 |. But he|y, look |
|00003a70| 77 68 61 74 20 79 6f 75 | 20 67 65 74 21 0d 57 65 |what you| get!.We|
|00003a80| 20 61 63 74 69 76 61 74 | 65 20 33 32 2d 62 69 74 | activat|e 32-bit|
|00003a90| 20 65 76 65 72 79 74 68 | 69 6e 67 20 63 6f 64 65 | everyth|ing code|
|00003aa0| 20 67 65 6e 65 72 61 74 | 69 6f 6e 20 61 6e 64 20 | generat|ion and |
|00003ab0| 6c 69 6e 6b 69 6e 67 20 | 62 79 20 75 73 69 6e 67 |linking |by using|
|00003ac0| 20 74 68 65 20 4d 41 42 | 75 69 6c 64 20 2d 4d 6f | the MAB|uild -Mo|
|00003ad0| 64 65 6c 46 61 72 20 66 | 6c 61 67 20 28 73 75 70 |delFar f|lag (sup|
|00003ae0| 70 6f 72 74 65 64 20 66 | 72 6f 6d 20 77 69 74 68 |ported f|rom with|
|00003af0| 20 4d 61 63 41 70 70 20 | 33 2e 30 20 66 6f 72 77 | MacApp |3.0 forw|
|00003b00| 61 72 64 29 2e 54 68 65 | 20 6e 65 77 20 4d 50 57 |ard).The| new MPW|
|00003b10| 20 33 2e 32 20 64 6f 63 | 75 6d 65 6e 74 61 74 69 | 3.2 doc|umentati|
|00003b20| 6f 6e 20 6f 6e 20 74 68 | 65 20 72 75 6e 74 69 6d |on on th|e runtim|
|00003b30| 65 20 61 72 63 68 69 74 | 65 63 74 75 72 65 20 65 |e archit|ecture e|
|00003b40| 78 70 6c 61 69 6e 73 20 | 74 68 65 20 69 6d 70 6c |xplains |the impl|
|00003b50| 65 6d 65 6e 74 61 74 69 | 6f 6e 2e 20 54 68 65 20 |ementati|on. The |
|00003b60| 74 72 69 63 6b 20 69 73 | 20 74 68 61 74 20 74 68 |trick is| that th|
|00003b70| 65 20 63 6f 6d 70 69 6c | 65 72 73 20 67 65 6e 65 |e compil|ers gene|
|00003b80| 72 61 74 65 20 69 6e 73 | 74 72 75 63 74 69 6f 6e |rate ins|truction|
|00003b90| 73 20 77 69 74 68 20 33 | 32 2d 62 69 74 20 61 64 |s with 3|2-bit ad|
|00003ba0| 64 72 65 73 73 65 73 20 | 28 69 6e 73 74 65 61 64 |dresses |(instead|
|00003bb0| 20 6f 66 20 74 68 65 20 | 6e 6f 72 6d 61 6c 20 31 | of the |normal 1|
|00003bc0| 36 2d 62 69 74 20 6f 66 | 66 73 65 74 73 29 2c 20 |6-bit of|fsets), |
|00003bd0| 61 6e 64 20 74 68 61 74 | 20 74 68 65 73 65 20 33 |and that| these 3|
|00003be0| 32 2d 62 69 74 20 61 64 | 64 72 65 73 73 65 73 20 |2-bit ad|dresses |
|00003bf0| 61 72 65 20 72 65 6c 6f | 63 61 74 65 64 20 61 74 |are relo|cated at|
|00003c00| 20 6c 6f 61 64 20 74 69 | 6d 65 20 62 79 20 74 68 | load ti|me by th|
|00003c10| 65 20 73 65 67 6d 65 6e | 74 20 6c 6f 61 64 20 61 |e segmen|t load a|
|00003c20| 64 64 72 65 73 73 20 6f | 72 20 62 79 20 74 68 65 |ddress o|r by the|
|00003c30| 20 63 6f 6e 74 65 6e 74 | 73 20 6f 66 20 41 35 2c | content|s of A5,|
|00003c40| 20 61 73 20 61 70 70 72 | 6f 70 72 69 61 74 65 2e | as appr|opriate.|
|00003c50| 0d 46 69 6e 61 6c 6c 79 | 2c 20 6f 6e 65 20 63 61 |.Finally|, one ca|
|00003c60| 6e 20 67 65 6e 65 72 61 | 74 65 20 6c 61 72 67 65 |n genera|te large|
|00003c70| 72 20 74 68 61 6e 20 33 | 32 4b 20 6a 75 6d 70 20 |r than 3|2K jump |
|00003c80| 74 61 62 6c 65 73 20 75 | 73 69 6e 67 20 74 68 65 |tables u|sing the|
|00003c90| 20 2d 77 72 61 70 20 6f | 70 74 69 6f 6e 2e 20 54 | -wrap o|ption. T|
|00003ca0| 68 69 73 20 75 73 65 73 | 20 75 6e 75 73 65 64 20 |his uses| unused |
|00003cb0| 73 70 61 63 65 20 69 6e | 20 74 68 65 20 67 6c 6f |space in| the glo|
|00003cc0| 62 61 6c 20 64 61 74 61 | 20 61 72 65 61 20 66 6f |bal data| area fo|
|00003cd0| 72 20 61 64 64 69 74 69 | 6f 6e 61 6c 20 6a 75 6d |r additi|onal jum|
|00003ce0| 70 20 74 61 62 6c 65 20 | 65 6e 74 72 69 65 73 20 |p table |entries |
|00003cf0| 77 68 65 6e 20 69 74 20 | 73 74 61 72 74 73 20 74 |when it |starts t|
|00003d00| 6f 20 67 65 74 20 63 72 | 6f 77 64 65 64 20 69 6e |o get cr|owded in|
|00003d10| 73 69 64 65 20 74 68 65 | 20 33 32 4b 20 73 65 67 |side the| 32K seg|
|00003d20| 6d 65 6e 74 2e 20 48 6f | 77 65 76 65 72 2c 20 61 |ment. Ho|wever, a|
|00003d30| 74 20 62 65 73 74 20 74 | 68 69 73 20 75 74 69 6c |t best t|his util|
|00003d40| 69 74 79 20 64 6f 75 62 | 6c 65 73 20 74 68 65 20 |ity doub|les the |
|00003d50| 6a 75 6d 70 20 74 61 62 | 6c 65 20 73 69 7a 65 2c |jump tab|le size,|
|00003d60| 20 61 6e 64 20 69 66 20 | 79 6f 75 72 20 67 6c 6f | and if |your glo|
|00003d70| 62 61 6c 20 64 61 74 61 | 20 61 72 65 61 20 69 73 |bal data| area is|
|00003d80| 20 61 6c 72 65 61 64 79 | 20 66 69 6c 6c 65 64 20 | already| filled |
|00003d90| 77 69 74 68 20 64 61 74 | 61 2c 20 79 6f 75 d5 72 |with dat|a, you.r|
|00003da0| 65 20 6f 75 74 20 6f 66 | 20 6c 75 63 6b 2e 20 0d |e out of| luck. .|
|00003db0| 4e 6f 74 65 3a 20 59 6f | 75 20 63 61 6e d5 74 20 |Note: Yo|u can.t |
|00003dc0| 75 73 65 20 62 6f 74 68 | 20 74 68 65 20 2d 77 72 |use both| the -wr|
|00003dd0| 61 70 20 61 6e 64 20 74 | 68 65 20 4d 6f 64 65 6c |ap and t|he Model|
|00003de0| 46 61 72 20 66 6c 61 67 | 73 20 69 6e 20 6f 72 64 |Far flag|s in ord|
|00003df0| 65 72 20 74 6f 20 63 68 | 65 61 74 20 61 6e 64 20 |er to ch|eat and |
|00003e00| 63 72 65 61 74 65 20 61 | 20 6c 61 72 67 65 20 67 |create a| large g|
|00003e10| 6c 6f 62 61 6c 20 64 61 | 74 61 20 73 65 67 6d 65 |lobal da|ta segme|
|00003e20| 6e 74 20 77 69 74 68 20 | 6a 75 6d 70 20 74 61 62 |nt with |jump tab|
|00003e30| 6c 65 20 65 6e 74 72 69 | 65 73 20 61 73 20 77 65 |le entri|es as we|
|00003e40| 6c 6c 2e 20 55 73 65 20 | 65 69 74 68 65 72 20 66 |ll. Use |either f|
|00003e50| 6c 61 67 20 6f 6e 6c 79 | 2e 0d 53 65 65 20 4d 50 |lag only|..See MP|
|00003e60| 57 20 64 6f 63 75 6d 65 | 6e 74 61 74 69 6f 6e 20 |W docume|ntation |
|00003e70| 66 6f 72 20 6d 6f 72 65 | 20 69 6e 66 6f 72 6d 61 |for more| informa|
|00003e80| 74 69 6f 6e 20 61 62 6f | 75 74 20 4d 6f 64 65 6c |tion abo|ut Model|
|00003e90| 46 61 72 20 61 6e 64 20 | 72 75 6e 74 69 6d 65 20 |Far and |runtime |
|00003ea0| 69 73 73 75 65 73 2e 0d | 41 6c 73 6f 2c 20 74 68 |issues..|Also, th|
|00003eb0| 65 20 4d 61 63 41 70 70 | 20 64 65 62 75 67 67 65 |e MacApp| debugge|
|00003ec0| 72 20 68 61 73 20 73 75 | 70 70 6f 72 74 20 66 6f |r has su|pport fo|
|00003ed0| 72 20 6d 6f 6e 69 74 6f | 72 69 6e 67 20 73 65 67 |r monito|ring seg|
|00003ee0| 6d 65 6e 74 20 6c 6f 61 | 64 69 6e 67 20 61 6e 64 |ment loa|ding and|
|00003ef0| 20 75 6e 6c 6f 61 64 69 | 6e 67 2e 20 50 6c 65 61 | unloadi|ng. Plea|
|00003f00| 73 65 20 63 6f 6e 73 75 | 6c 74 20 74 68 65 20 63 |se consu|lt the c|
|00003f10| 75 72 72 65 6e 74 20 4d | 61 63 41 70 70 20 64 6f |urrent M|acApp do|
|00003f20| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 20 66 6f 72 20 |cumentat|ion for |
|00003f30| 6d 6f 72 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |more inf|ormation|
|00003f40| 2e 0d 53 65 67 6d 65 6e | 74 73 20 61 6e 64 20 46 |..Segmen|ts and F|
|00003f50| 72 61 67 6d 65 6e 74 61 | 74 69 6f 6e 0d 53 6f 6d |ragmenta|tion.Som|
|00003f60| 65 74 69 6d 65 73 20 77 | 65 20 77 61 6e 74 20 74 |etimes w|e want t|
|00003f70| 6f 20 6d 6f 76 65 20 61 | 20 73 65 70 61 72 61 74 |o move a| separat|
|00003f80| 65 20 73 65 67 6d 65 6e | 74 20 62 61 63 6b 20 69 |e segmen|t back i|
|00003f90| 6e 74 6f 20 74 68 65 20 | 4d 61 69 6e 20 73 65 67 |nto the |Main seg|
|00003fa0| 6d 65 6e 74 2c 20 74 6f | 20 61 76 6f 69 64 20 74 |ment, to| avoid t|
|00003fb0| 6f 6f 20 6d 61 6e 79 20 | 73 65 67 6d 65 6e 74 73 |oo many |segments|
|00003fc0| d1 61 20 63 6f 6e 64 69 | 74 69 6f 6e 20 74 68 61 |.a condi|tion tha|
|00003fd0| 74 20 63 61 6e 20 6c 65 | 61 64 20 74 6f 20 68 65 |t can le|ad to he|
|00003fe0| 61 70 20 66 72 61 67 6d | 65 6e 74 61 74 69 6f 6e |ap fragm|entation|
|00003ff0| 2e 20 54 68 69 73 20 63 | 6f 75 6c 64 20 62 65 20 |. This c|ould be |
|00004000| 74 68 65 20 63 61 73 65 | 20 77 69 74 68 20 6c 69 |the case| with li|
|00004010| 62 72 61 72 69 65 73 20 | 74 68 61 74 20 77 65 20 |braries |that we |
|00004020| 75 73 65 20 77 69 74 68 | 20 74 68 65 20 4d 61 63 |use with| the Mac|
|00004030| 41 70 70 20 61 70 70 6c | 69 63 61 74 69 6f 6e 2e |App appl|ication.|
|00004040| 20 46 6f 72 20 69 6e 73 | 74 61 6e 63 65 20 66 75 | For ins|tance fu|
|00004050| 6e 63 74 69 6f 6e 73 20 | 66 72 6f 6d 20 6c 69 62 |nctions |from lib|
|00004060| 72 61 72 69 65 73 20 6d | 69 67 68 74 20 72 65 73 |raries m|ight res|
|00004070| 69 64 65 20 69 6e 20 73 | 6d 61 6c 6c 20 73 65 67 |ide in s|mall seg|
|00004080| 6d 65 6e 74 73 2c 20 61 | 6e 64 20 77 65 20 77 6f |ments, a|nd we wo|
|00004090| 75 6c 64 20 6c 69 6b 65 | 20 74 6f 20 72 65 6d 61 |uld like| to rema|
|000040a0| 70 20 74 68 65 6d 20 62 | 61 63 6b 20 74 6f 20 61 |p them b|ack to a|
|000040b0| 20 72 65 73 69 64 65 6e | 74 20 73 65 67 6d 65 6e | residen|t segmen|
|000040c0| 74 2c 20 73 75 63 68 20 | 61 73 20 4d 61 69 6e 2e |t, such |as Main.|
|000040d0| 20 54 68 65 20 4d 50 57 | 20 4c 69 6e 6b 20 61 6e | The MPW| Link an|
|000040e0| 64 20 4c 69 62 20 74 6f | 6f 6c 73 20 63 61 6e 20 |d Lib to|ols can |
|000040f0| 72 65 6d 61 70 20 74 68 | 65 20 73 65 67 6d 65 6e |remap th|e segmen|
|00004100| 74 61 74 69 6f 6e 20 77 | 69 74 68 20 72 6f 75 74 |tation w|ith rout|
|00004110| 69 6e 65 73 20 74 6f 20 | 6f 74 68 65 72 20 73 65 |ines to |other se|
|00004120| 67 6d 65 6e 74 20 6e 61 | 6d 65 73 2e 20 54 68 65 |gment na|mes. The|
|00004130| 20 73 79 6e 74 61 78 20 | 6c 6f 6f 6b 73 20 6c 69 | syntax |looks li|
|00004140| 6b 65 20 74 68 69 73 3a | 0d 4c 69 6e 6b 20 5b 6f |ke this:|.Link [o|
|00004150| 70 74 69 6f 6e 73 2e 2e | 2e 5d 20 6f 62 6a 65 63 |ptions..|.] objec|
|00004160| 74 66 69 6c 65 c9 20 b3 | 20 70 72 6f 67 72 65 73 |tfile. .| progres|
|00004170| 73 2e 66 69 6c 65 0d 09 | 2d 73 6e 3d 6f 6c 64 53 |s.file..|-sn=oldS|
|00004180| 65 67 4e 61 6d 65 31 3d | 6e 65 77 53 65 67 4e 61 |egName1=|newSegNa|
|00004190| 6d 65 31 0d 09 2d 73 6e | 3d 6f 6c 64 53 65 67 4e |me1..-sn|=oldSegN|
|000041a0| 61 6d 65 32 3d 6e 65 77 | 53 65 67 4e 61 6d 65 32 |ame2=new|SegName2|
|000041b0| 0d 4e 6f 74 65 20 74 68 | 61 74 20 66 72 61 67 6d |.Note th|at fragm|
|000041c0| 65 6e 74 61 74 69 6f 6e | 20 69 73 20 6e 6f 74 20 |entation| is not |
|000041d0| 61 20 70 72 6f 62 6c 65 | 6d 20 66 6f 72 20 4d 61 |a proble|m for Ma|
|000041e0| 63 41 70 70 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |cApp app|lication|
|000041f0| 73 2e 20 41 6c 6c 20 72 | 65 73 69 64 65 6e 74 20 |s. All r|esident |
|00004200| 73 65 67 6d 65 6e 74 73 | 20 61 72 65 20 70 72 65 |segments| are pre|
|00004210| 6c 6f 61 64 65 64 20 61 | 6e 64 20 6c 6f 63 6b 65 |loaded a|nd locke|
|00004220| 64 20 68 69 67 68 20 69 | 6e 20 6d 65 6d 6f 72 79 |d high i|n memory|
|00004230| 2e 20 4e 6f 6e 72 65 73 | 69 64 65 6e 74 20 73 65 |. Nonres|ident se|
|00004240| 67 6d 65 6e 74 73 20 74 | 68 61 74 20 61 72 65 20 |gments t|hat are |
|00004250| 69 6e 20 75 73 65 20 61 | 72 65 20 61 6c 73 6f 20 |in use a|re also |
|00004260| 6c 6f 63 6b 65 64 20 68 | 69 67 68 2e 20 53 65 67 |locked h|igh. Seg|
|00004270| 6d 65 6e 74 73 20 74 68 | 61 74 20 61 72 65 20 6e |ments th|at are n|
|00004280| 6f 74 20 69 6e 20 75 73 | 65 20 62 75 74 20 73 74 |ot in us|e but st|
|00004290| 69 6c 6c 20 70 72 65 73 | 65 6e 74 20 61 72 65 20 |ill pres|ent are |
|000042a0| 6e 6f 74 20 6c 6f 63 6b | 65 64 2e 20 54 68 69 73 |not lock|ed. This|
|000042b0| 20 6d 65 61 6e 73 20 74 | 68 65 79 20 63 61 6e 20 | means t|hey can |
|000042c0| 62 65 20 6d 6f 76 65 64 | 20 62 79 20 74 68 65 20 |be moved| by the |
|000042d0| 4d 65 6d 6f 72 79 20 4d | 61 6e 61 67 65 72 20 28 |Memory M|anager (|
|000042e0| 77 68 69 63 68 20 64 6f | 65 73 20 6e 6f 74 20 63 |which do|es not c|
|000042f0| 6f 6e 74 72 69 62 75 74 | 65 20 61 6e 79 20 66 72 |ontribut|e any fr|
|00004300| 61 67 6d 65 6e 74 61 74 | 69 6f 6e 29 2e 0d 41 6e |agmentat|ion)..An|
|00004310| 6f 74 68 65 72 20 73 6f | 6c 75 74 69 6f 6e 20 69 |other so|lution i|
|00004320| 73 20 74 6f 20 75 73 65 | 20 74 68 65 20 6c 69 6e |s to use| the lin|
|00004330| 6b 65 72 20 74 6f 20 6d | 61 72 6b 20 63 6f 64 65 |ker to m|ark code|
|00004340| 20 72 65 73 6f 75 72 63 | 65 73 20 66 72 6f 6d 20 | resourc|es from |
|00004350| 74 68 65 20 6c 69 62 72 | 61 72 69 65 73 20 61 73 |the libr|aries as|
|00004360| 20 6c 6f 63 6b 65 64 2e | 20 54 68 65 73 65 20 73 | locked.| These s|
|00004370| 65 67 6d 65 6e 74 73 20 | 77 69 6c 6c 20 74 68 65 |egments |will the|
|00004380| 6e 20 62 65 20 6c 6f 61 | 64 65 64 20 69 6e 74 6f |n be loa|ded into|
|00004390| 20 6d 65 6d 6f 72 79 20 | 61 73 20 72 65 73 69 64 | memory |as resid|
|000043a0| 65 6e 74 20 73 65 67 6d | 65 6e 74 73 2c 20 61 76 |ent segm|ents, av|
|000043b0| 6f 69 64 69 6e 67 20 66 | 72 61 67 6d 65 6e 74 61 |oiding f|ragmenta|
|000043c0| 74 69 6f 6e 20 70 72 6f | 62 6c 65 6d 73 2e 20 54 |tion pro|blems. T|
|000043d0| 6f 20 64 6f 20 74 68 69 | 73 2c 20 66 6f 72 20 69 |o do thi|s, for i|
|000043e0| 6e 73 74 61 6e 63 65 20 | 6d 6f 64 69 66 79 20 74 |nstance |modify t|
|000043f0| 68 65 20 75 73 65 72 20 | 76 61 72 69 61 62 6c 65 |he user |variable|
|00004400| 20 4f 74 68 65 72 4c 69 | 6e 6b 4f 70 74 69 6f 6e | OtherLi|nkOption|
|00004410| 73 20 69 6e 20 74 68 65 | 20 4d 41 4d 61 6b 65 20 |s in the| MAMake |
|00004420| 66 69 6c 65 3a 0d 4f 74 | 68 65 72 4c 69 6e 6b 4f |file:.Ot|herLinkO|
|00004430| 70 74 69 6f 6e 73 20 3d | 20 b6 0d 09 2d 72 61 20 |ptions =| ...-ra |
|00004440| 46 4f 4f 53 45 47 4d 45 | 4e 54 3d 72 65 73 4c 6f |FOOSEGME|NT=resLo|
|00004450| 63 6b 65 64 20 b6 0d 09 | 2d 72 61 20 42 41 52 53 |cked ...|-ra BARS|
|00004460| 45 47 4d 45 4e 54 3d 72 | 65 73 4c 6f 63 6b 65 64 |EGMENT=r|esLocked|
|00004470| 0d 59 65 74 20 61 67 61 | 69 6e 20 69 6e 20 74 68 |.Yet aga|in in th|
|00004480| 65 20 63 61 73 65 20 6f | 66 20 4d 61 63 41 70 70 |e case o|f MacApp|
|00004490| 20 74 68 69 73 20 69 73 | 20 6e 6f 74 20 6e 65 63 | this is| not nec|
|000044a0| 65 73 73 61 72 79 2e 20 | 54 68 65 20 4d 61 63 41 |essary. |The MacA|
|000044b0| 70 70 20 77 61 79 20 69 | 73 20 74 6f 20 64 65 66 |pp way i|s to def|
|000044c0| 69 6e 65 20 74 68 65 73 | 65 20 73 65 67 6d 65 6e |ine thes|e segmen|
|000044d0| 74 73 20 69 6e 20 74 68 | 65 20 27 72 65 73 21 27 |ts in th|e 'res!'|
|000044e0| 20 72 65 73 6f 75 72 63 | 65 2c 20 61 6e 64 20 4d | resourc|e, and M|
|000044f0| 61 63 41 70 70 20 77 69 | 6c 6c 20 6c 6f 63 6b 20 |acApp wi|ll lock |
|00004500| 74 68 65 20 72 65 73 6f | 75 72 63 65 73 20 61 74 |the reso|urces at|
|00004510| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 73 74 61 | applica|tion sta|
|00004520| 72 74 75 70 2e 20 0d 46 | 69 6e 61 6c 6c 79 2c 20 |rtup. .F|inally, |
|00004530| 79 6f 75 20 63 61 6e 20 | 75 73 65 20 74 68 65 20 |you can |use the |
|00004540| 6c 69 6e 6b 65 72 20 74 | 6f 20 6d 65 72 67 65 20 |linker t|o merge |
|00004550| 6f 6c 64 20 73 65 67 6d | 65 6e 74 73 20 69 6e 74 |old segm|ents int|
|00004560| 6f 20 6e 65 77 20 73 65 | 67 6d 65 6e 74 73 20 77 |o new se|gments w|
|00004570| 69 74 68 20 74 68 65 20 | 2d 73 67 20 6f 70 74 69 |ith the |-sg opti|
|00004580| 6f 6e 3a 0d 2d 73 67 20 | 6e 65 77 53 65 67 5b 3d |on:.-sg |newSeg[=|
|00004590| 6f 6c 64 5b 2c 6f 6c 64 | 5d c9 5d 20 23 20 6d 65 |old[,old|].] # me|
|000045a0| 72 67 65 20 6f 6c 64 20 | 73 65 67 6d 65 6e 74 73 |rge old |segments|
|000045b0| 20 69 6e 74 6f 20 6e 65 | 77 53 65 67 0d 4c 69 6e | into ne|wSeg.Lin|
|000045c0| 6b 65 72 20 50 72 6f 62 | 6c 65 6d 73 20 61 6e 64 |ker Prob|lems and|
|000045d0| 20 45 72 72 6f 72 73 0d | 41 20 76 65 72 79 20 74 | Errors.|A very t|
|000045e0| 79 70 69 63 61 6c 20 4c | 69 6e 6b 20 65 72 72 6f |ypical L|ink erro|
|000045f0| 72 20 77 69 74 68 20 68 | 75 67 65 20 4d 61 63 41 |r with h|uge MacA|
|00004600| 70 70 20 70 72 6f 6a 65 | 63 74 73 20 6c 6f 6f 6b |pp proje|cts look|
|00004610| 73 20 6c 69 6b 65 3a 0d | 23 23 23 20 4c 69 6e 6b |s like:.|### Link|
|00004620| 3a 20 45 72 72 6f 72 3a | 20 31 36 2d 62 69 74 20 |: Error:| 16-bit |
|00004630| 72 65 66 65 72 65 6e 63 | 65 20 6f 66 66 73 65 74 |referenc|e offset|
|00004640| 20 6f 75 74 20 6f 66 20 | 72 61 6e 67 65 2e 20 28 | out of |range. (|
|00004650| 45 72 72 6f 72 20 31 31 | 34 29 20 61 74 20 24 30 |Error 11|4) at $0|
|00004660| 30 30 34 34 20 69 6e 20 | 54 49 4e 44 45 58 43 4c |0044 in |TINDEXCL|
|00004670| 45 41 52 43 4d 44 5f 55 | 4e 44 4f 49 54 0d 23 23 |EARCMD_U|NDOIT.##|
|00004680| 23 20 57 68 69 6c 65 20 | 72 65 61 64 69 6e 67 20 |# While |reading |
|00004690| 66 69 6c 65 20 22 57 6f | 72 6b 3a 53 6f 75 72 63 |file "Wo|rk:Sourc|
|000046a0| 65 73 3a 46 6f 6f 42 61 | 72 20 53 75 70 65 72 41 |es:FooBa|r SuperA|
|000046b0| 70 70 3a 2e 4e 6f 6e 2d | 44 65 62 75 67 20 46 69 |pp:.Non-|Debug Fi|
|000046c0| 6c 65 73 3a 45 69 6e 5a | 77 65 69 44 72 65 69 2e |les:EinZ|weiDrei.|
|000046d0| 63 70 2e 6f 22 0d 23 23 | 23 20 4c 69 6e 6b 3a 20 |cp.o".##|# Link: |
|000046e0| 45 72 72 6f 72 3a 20 31 | 36 2d 62 69 74 20 72 65 |Error: 1|6-bit re|
|000046f0| 66 65 72 65 6e 63 65 20 | 6f 66 66 73 65 74 20 6f |ference |offset o|
|00004700| 75 74 20 6f 66 20 72 61 | 6e 67 65 2e 20 28 45 72 |ut of ra|nge. (Er|
|00004710| 72 6f 72 20 31 31 34 29 | 20 61 74 20 24 30 30 30 |ror 114)| at $000|
|00004720| 31 32 20 69 6e 20 54 47 | 4f 54 54 45 4e 4c 49 53 |12 in TG|OTTENLIS|
|00004730| 54 5f 49 4f 42 4a 45 43 | 54 0d 23 23 23 20 4c 69 |T_IOBJEC|T.### Li|
|00004740| 6e 6b 3a 20 45 72 72 6f | 72 3a 20 31 36 2d 62 69 |nk: Erro|r: 16-bi|
|00004750| 74 20 72 65 66 65 72 65 | 6e 63 65 20 6f 66 66 73 |t refere|nce offs|
|00004760| 65 74 20 6f 75 74 20 6f | 66 20 72 61 6e 67 65 2e |et out o|f range.|
|00004770| 20 28 45 72 72 6f 72 20 | 31 31 34 29 20 61 74 20 | (Error |114) at |
|00004780| 24 30 30 30 31 32 20 69 | 6e 20 54 47 4f 54 54 45 |$00012 i|n TGOTTE|
|00004790| 4e 4c 49 53 54 5f 46 52 | 45 45 0d 23 23 23 20 4c |NLIST_FR|EE.### L|
|000047a0| 69 6e 6b 3a 20 45 72 72 | 6f 72 3a 20 31 36 2d 62 |ink: Err|or: 16-b|
|000047b0| 69 74 20 72 65 66 65 72 | 65 6e 63 65 20 6f 66 66 |it refer|ence off|
|000047c0| 73 65 74 20 6f 75 74 20 | 6f 66 20 72 61 6e 67 65 |set out |of range|
|000047d0| 2e 20 28 45 72 72 6f 72 | 20 31 31 34 29 20 61 74 |. (Error| 114) at|
|000047e0| 20 24 30 30 30 32 36 20 | 69 6e 20 54 47 6f 74 74 | $00026 |in TGott|
|000047f0| 65 6e 4c 69 73 74 5f 53 | 65 74 44 69 73 70 6c 61 |enList_S|etDispla|
|00004800| 79 53 74 72 69 6e 67 0d | 54 68 69 73 20 6d 65 61 |yString.|This mea|
|00004810| 6e 73 20 74 68 61 74 20 | 74 68 65 20 6c 69 6e 6b |ns that |the link|
|00004820| 65 72 20 63 61 6e d5 74 | 20 63 72 65 61 74 65 20 |er can.t| create |
|00004830| 31 36 2d 62 69 74 20 6f | 66 66 73 65 74 20 72 65 |16-bit o|ffset re|
|00004840| 66 65 72 65 6e 63 65 73 | 20 77 69 74 68 69 6e 20 |ferences| within |
|00004850| 74 68 65 20 73 61 6d 65 | 20 63 6f 64 65 20 73 65 |the same| code se|
|00004860| 67 6d 65 6e 74 2c 20 6f | 72 20 74 68 61 74 20 77 |gment, o|r that w|
|00004870| 65 20 63 61 6e d5 74 20 | 64 6f 20 31 36 2d 62 69 |e can.t |do 16-bi|
|00004880| 74 20 50 43 2d 72 65 6c | 61 74 69 76 65 20 6a 75 |t PC-rel|ative ju|
|00004890| 6d 70 73 2e 20 54 68 65 | 20 77 61 79 20 74 6f 20 |mps. The| way to |
|000048a0| 67 6f 20 69 73 20 74 6f | 20 73 74 61 72 74 20 75 |go is to| start u|
|000048b0| 73 69 6e 67 20 4d 6f 64 | 65 6c 46 61 72 20 73 75 |sing Mod|elFar su|
|000048c0| 70 70 6f 72 74 2e 0d 53 | 6f 6d 65 74 69 6d 65 73 |pport..S|ometimes|
|000048d0| 20 65 76 65 6e 20 69 66 | 20 77 65 20 63 6f 6d 70 | even if| we comp|
|000048e0| 69 6c 65 20 61 6e 64 20 | 6c 69 6e 6b 20 75 73 69 |ile and |link usi|
|000048f0| 6e 67 20 2d 4d 6f 64 65 | 6c 46 61 72 2c 20 77 65 |ng -Mode|lFar, we|
|00004900| 20 77 69 6c 6c 20 73 74 | 69 6c 6c 20 73 65 65 20 | will st|ill see |
|00004910| 74 68 65 73 65 20 70 72 | 6f 62 6c 65 6d 73 2e 20 |these pr|oblems. |
|00004920| 54 68 69 73 20 68 61 73 | 20 74 6f 20 64 6f 20 77 |This has| to do w|
|00004930| 69 74 68 20 52 75 6e 74 | 69 6d 65 2e 6f 20 61 6e |ith Runt|ime.o an|
|00004940| 64 20 61 6c 6c 20 6f 74 | 68 65 72 20 73 74 61 6e |d all ot|her stan|
|00004950| 64 61 72 64 20 6c 69 62 | 72 61 72 69 65 73 20 69 |dard lib|raries i|
|00004960| 6e 20 4d 50 57 20 74 68 | 61 74 20 61 72 65 20 6e |n MPW th|at are n|
|00004970| 6f 74 20 63 6f 6d 70 69 | 6c 65 64 20 77 69 74 68 |ot compi|led with|
|00004980| 20 4d 6f 64 65 6c 46 61 | 72 2e 20 53 6f 6d 65 74 | ModelFa|r. Somet|
|00004990| 69 6d 65 73 20 74 68 65 | 20 70 6c 61 63 65 6d 65 |imes the| placeme|
|000049a0| 6e 74 20 6f 66 20 6c 69 | 6e 6b 20 6d 6f 64 75 6c |nt of li|nk modul|
|000049b0| 65 73 20 68 65 6c 70 73 | 2c 20 77 68 65 72 65 20 |es helps|, where |
|000049c0| 74 68 65 20 6d 6f 64 75 | 6c 65 20 77 69 74 68 20 |the modu|le with |
|000049d0| 74 68 65 20 6d 61 69 6e | 20 73 74 75 62 20 69 73 |the main| stub is|
|000049e0| 20 74 68 65 20 66 69 72 | 73 74 20 6f 6e 65 2c 20 | the fir|st one, |
|000049f0| 52 75 6e 74 69 6d 65 2e | 6f 20 69 73 20 74 68 65 |Runtime.|o is the|
|00004a00| 20 73 65 63 6f 6e 64 20 | 6f 6e 65 20 28 75 73 75 | second |one (usu|
|00004a10| 61 6c 6c 79 20 52 75 6e | 74 69 6d 65 2e 6f 20 61 |ally Run|time.o a|
|00004a20| 6e 64 20 4d 61 69 6e 20 | 74 61 6c 6b 20 77 69 74 |nd Main |talk wit|
|00004a30| 68 20 65 61 63 68 20 6f | 74 68 65 72 20 61 20 6c |h each o|ther a l|
|00004a40| 6f 74 29 2c 20 74 68 65 | 6e 20 6d 6f 73 74 20 73 |ot), the|n most s|
|00004a50| 74 61 6e 64 61 72 64 20 | 6c 69 62 72 61 72 69 65 |tandard |librarie|
|00004a60| 73 20 61 6e 64 20 61 6c | 6c 20 74 68 65 20 6f 74 |s and al|l the ot|
|00004a70| 68 65 72 20 6d 6f 64 75 | 6c 65 73 20 6c 61 73 74 |her modu|les last|
|00004a80| 2e 20 49 66 20 79 6f 75 | 20 73 75 73 70 65 63 74 |. If you| suspect|
|00004a90| 20 74 68 69 73 20 69 73 | 20 74 68 65 20 63 61 73 | this is| the cas|
|00004aa0| 65 2c 20 6d 6f 64 69 66 | 79 20 74 68 65 20 22 42 |e, modif|y the "B|
|00004ab0| 75 69 6c 64 20 52 75 6c | 65 73 20 61 6e 64 20 44 |uild Rul|es and D|
|00004ac0| 65 66 69 6e 69 74 69 6f | 6e 73 22 20 4d 61 63 41 |efinitio|ns" MacA|
|00004ad0| 70 70 20 66 69 6c 65 2c | 20 61 6e 64 20 6d 6f 76 |pp file,| and mov|
|00004ae0| 65 20 74 68 65 20 52 75 | 6e 74 69 6d 65 2e 6f 20 |e the Ru|ntime.o |
|00004af0| 6c 69 6e 6b 20 69 6e 73 | 74 72 75 63 74 69 6f 6e |link ins|truction|
|00004b00| 20 6e 65 61 72 65 72 20 | 74 68 65 20 6c 69 62 72 | nearer |the libr|
|00004b10| 61 72 69 65 73 20 6f 72 | 20 6f 62 6a 65 63 74 20 |aries or| object |
|00004b20| 66 69 6c 65 73 20 74 68 | 61 74 20 63 6f 6e 74 61 |files th|at conta|
|00004b30| 69 6e 20 4d 61 69 6e 20 | 73 65 67 6d 65 6e 74 73 |in Main |segments|
|00004b40| 2e 0d 41 6e 6f 74 68 65 | 72 20 74 72 69 63 6b 20 |..Anothe|r trick |
|00004b50| 69 73 20 74 6f 20 75 73 | 65 20 74 68 65 20 2d 73 |is to us|e the -s|
|00004b60| 6f 72 74 73 67 20 6c 69 | 6e 6b 20 66 6c 61 67 2e |ortsg li|nk flag.|
|00004b70| 20 54 68 65 20 6c 69 6e | 6b 65 72 20 77 69 6c 6c | The lin|ker will|
|00004b80| 20 6d 6f 76 65 20 74 68 | 65 20 6d 6f 73 74 20 66 | move th|e most f|
|00004b90| 72 65 71 75 65 6e 74 6c | 79 20 63 61 6c 6c 65 64 |requentl|y called|
|00004ba0| 20 72 6f 75 74 69 6e 65 | 73 20 74 6f 20 74 68 65 | routine|s to the|
|00004bb0| 20 66 69 72 73 74 20 33 | 32 4b 20 70 61 72 74 20 | first 3|2K part |
|00004bc0| 6f 66 20 74 68 65 20 73 | 65 67 6d 65 6e 74 2c 20 |of the s|egment, |
|00004bd0| 61 6e 64 20 69 6e 20 73 | 6f 6d 65 20 63 61 73 65 |and in s|ome case|
|00004be0| 73 20 74 68 69 73 20 77 | 69 6c 6c 20 73 6f 6c 76 |s this w|ill solv|
|00004bf0| 65 20 74 68 65 20 6f 66 | 66 73 65 74 20 70 72 6f |e the of|fset pro|
|00004c00| 62 6c 65 6d 2e 20 46 69 | 6e 61 6c 6c 79 20 69 66 |blem. Fi|nally if|
|00004c10| 20 79 6f 75 20 68 61 76 | 65 20 61 20 6c 6f 74 20 | you hav|e a lot |
|00004c20| 6f 66 20 73 74 72 69 6e | 67 20 6c 69 74 65 72 61 |of strin|g litera|
|00004c30| 6c 73 2c 20 69 66 20 79 | 6f 75 20 75 73 65 20 74 |ls, if y|ou use t|
|00004c40| 68 65 20 2d 62 32 20 6c | 69 6e 6b 20 66 6c 61 67 |he -b2 l|ink flag|
|00004c50| 20 74 68 65 20 73 74 72 | 69 6e 67 73 20 77 69 6c | the str|ings wil|
|00004c60| 6c 20 62 65 20 65 6d 62 | 65 64 64 65 64 20 69 6e |l be emb|edded in|
|00004c70| 20 65 2e 20 0d 52 65 73 | 69 64 65 6e 74 20 53 65 | e. .Res|ident Se|
|00004c80| 67 6d 65 6e 74 20 44 61 | 6e 67 65 72 73 0d 48 65 |gment Da|ngers.He|
|00004c90| 72 65 d5 73 20 61 6e 20 | 69 6d 70 6f 72 74 61 6e |re.s an |importan|
|00004ca0| 74 20 6e 6f 74 65 20 74 | 6f 20 72 65 6d 65 6d 62 |t note t|o rememb|
|00004cb0| 65 72 2e 20 49 66 20 79 | 6f 75 20 6d 61 6b 65 20 |er. If y|ou make |
|00004cc0| 61 20 73 65 67 6d 65 6e | 74 20 72 65 73 69 64 65 |a segmen|t reside|
|00004cd0| 6e 74 20 28 66 6f 72 20 | 69 6e 73 74 61 6e 63 65 |nt (for |instance|
|00004ce0| 20 69 6e 63 6c 75 64 69 | 6e 67 20 69 74 20 69 6e | includi|ng it in|
|00004cf0| 20 74 68 65 20 27 72 65 | 73 21 27 20 72 65 73 6f | the 're|s!' reso|
|00004d00| 75 72 63 65 29 2c 20 74 | 68 65 6e 20 74 68 65 20 |urce), t|hen the |
|00004d10| 4d 61 63 41 70 70 20 6d | 65 6d 6f 72 79 20 6d 61 |MacApp m|emory ma|
|00004d20| 6e 61 67 65 6d 65 6e 74 | 20 63 6f 64 65 20 77 69 |nagement| code wi|
|00004d30| 6c 6c 20 63 61 6c 6c 20 | 47 65 74 4e 61 6d 65 64 |ll call |GetNamed|
|00004d40| 52 65 73 6f 75 72 63 65 | 20 74 6f 20 6c 6f 61 64 |Resource| to load|
|00004d50| 20 74 68 65 20 73 65 67 | 6d 65 6e 74 2c 20 61 6e | the seg|ment, an|
|00004d60| 64 20 61 6c 73 6f 20 6c | 6f 63 6b 20 69 74 2e 20 |d also l|ock it. |
|00004d70| 48 6f 77 65 76 65 72 2c | 20 74 68 65 20 6a 75 6d |However,| the jum|
|00004d80| 70 20 74 61 62 6c 65 20 | 73 74 69 6c 6c 20 68 61 |p table |still ha|
|00004d90| 73 20 74 68 69 73 20 73 | 65 67 6d 65 6e 74 20 64 |s this s|egment d|
|00004da0| 65 66 69 6e 65 64 20 69 | 6e 20 61 6e 20 75 6e 6c |efined i|n an unl|
|00004db0| 6f 61 64 65 64 20 73 74 | 61 74 65 2e 0d 53 6f 20 |oaded st|ate..So |
|00004dc0| 74 68 65 20 66 69 72 73 | 74 20 74 69 6d 65 20 79 |the firs|t time y|
|00004dd0| 6f 75 20 63 61 6c 6c 20 | 61 20 72 6f 75 74 69 6e |ou call |a routin|
|00004de0| 65 20 69 6e 20 74 68 65 | 20 73 65 67 6d 65 6e 74 |e in the| segment|
|00004df0| 2c 20 74 68 65 20 63 6f | 64 65 20 77 69 6c 6c 20 |, the co|de will |
|00004e00| 74 72 69 67 67 65 72 20 | 61 20 4c 6f 61 64 53 65 |trigger |a LoadSe|
|00004e10| 67 20 63 61 6c 6c 2e 20 | 4e 6f 77 20 74 68 65 20 |g call. |Now the |
|00004e20| 6a 75 6d 70 20 74 61 62 | 6c 65 20 68 61 73 20 74 |jump tab|le has t|
|00004e30| 68 65 20 73 65 67 6d 65 | 6e 74 20 64 65 66 69 6e |he segme|nt defin|
|00004e40| 65 64 20 74 6f 20 62 65 | 20 69 6e 20 61 20 6c 6f |ed to be| in a lo|
|00004e50| 61 64 65 64 20 73 74 61 | 74 65 20 28 6e 6f 20 6d |aded sta|te (no m|
|00004e60| 6f 72 65 20 6e 65 65 64 | 20 66 6f 72 20 4c 6f 61 |ore need| for Loa|
|00004e70| 64 53 65 67 20 63 61 6c | 6c 73 29 2e 0d 54 68 69 |dSeg cal|ls)..Thi|
|00004e80| 73 20 77 6f 72 6b 73 20 | 66 69 6e 65 20 64 75 72 |s works |fine dur|
|00004e90| 69 6e 67 20 61 20 73 61 | 66 65 20 70 65 72 69 6f |ing a sa|fe perio|
|00004ea0| 64 20 6f 66 20 73 65 67 | 6d 65 6e 74 20 6c 6f 61 |d of seg|ment loa|
|00004eb0| 64 69 6e 67 2e 20 48 6f | 77 65 76 65 72 2c 20 69 |ding. Ho|wever, i|
|00004ec0| 66 20 79 6f 75 20 63 61 | 6c 6c 20 74 68 65 20 72 |f you ca|ll the r|
|00004ed0| 6f 75 74 69 6e 65 20 64 | 75 72 69 6e 67 20 61 20 |outine d|uring a |
|00004ee0| 63 72 69 74 69 63 61 6c | 20 74 69 6d 65 20 77 68 |critical| time wh|
|00004ef0| 65 6e 20 69 74 d5 73 20 | 6e 6f 74 20 73 61 66 65 |en it.s |not safe|
|00004f00| 20 74 6f 20 63 61 6c 6c | 20 4c 6f 61 64 53 65 67 | to call| LoadSeg|
|00004f10| 20 28 66 6f 72 20 69 6e | 73 74 61 6e 63 65 20 66 | (for in|stance f|
|00004f20| 72 6f 6d 20 61 20 56 42 | 4c 20 74 61 73 6b 29 2c |rom a VB|L task),|
|00004f30| 20 79 6f 75 20 6d 69 67 | 68 74 20 67 65 74 20 69 | you mig|ht get i|
|00004f40| 6e 74 6f 20 74 72 6f 75 | 62 6c 65 2e 0d 4f 6e 65 |nto trou|ble..One|
|00004f50| 20 77 6f 72 6b 61 72 6f | 75 6e 64 20 69 73 20 74 | workaro|und is t|
|00004f60| 6f 20 6d 61 6b 65 20 73 | 75 72 65 20 74 6f 20 63 |o make s|ure to c|
|00004f70| 61 6c 6c 20 74 68 65 20 | 66 69 72 73 74 20 72 6f |all the |first ro|
|00004f80| 75 74 69 6e 65 20 66 72 | 6f 6d 20 74 68 69 73 20 |utine fr|om this |
|00004f90| 72 65 73 69 64 65 6e 74 | 20 73 65 67 6d 65 6e 74 |resident| segment|
|00004fa0| 20 64 75 72 69 6e 67 20 | 61 20 73 61 66 65 20 74 | during |a safe t|
|00004fb0| 69 6d 65 2e 20 46 6f 72 | 20 69 6e 73 74 61 6e 63 |ime. For| instanc|
|00004fc0| 65 20 79 6f 75 20 63 6f | 75 6c 64 20 63 61 6c 6c |e you co|uld call|
|00004fd0| 20 74 68 65 20 66 75 6e | 63 74 69 6f 6e 20 69 74 | the fun|ction it|
|00004fe0| 73 65 6c 66 20 66 72 6f | 6d 20 61 6e 6f 74 68 65 |self fro|m anothe|
|00004ff0| 72 20 73 65 67 6d 65 6e | 74 20 28 61 73 20 69 6e |r segmen|t (as in|
|00005000| 20 74 68 65 20 69 6e 69 | 74 69 61 6c 69 7a 61 74 | the ini|tializat|
|00005010| 69 6f 6e 20 70 68 61 73 | 65 2c 20 66 72 6f 6d 20 |ion phas|e, from |
|00005020| 4d 61 69 6e 29 2e 20 54 | 68 69 73 20 77 69 6c 6c |Main). T|his will|
|00005030| 20 63 61 75 73 65 20 74 | 68 65 20 53 65 67 6d 65 | cause t|he Segme|
|00005040| 6e 74 20 4c 6f 61 64 65 | 72 20 74 6f 20 63 6f 6e |nt Loade|r to con|
|00005050| 76 65 72 74 20 74 68 65 | 20 66 75 6e 63 74 69 6f |vert the| functio|
|00005060| 6e d5 73 20 6a 75 6d 70 | 20 74 61 62 6c 65 20 65 |n.s jump| table e|
|00005070| 6e 74 72 79 2c 20 73 6f | 20 74 68 69 73 20 66 75 |ntry, so| this fu|
|00005080| 6e 63 74 69 6f 6e 20 63 | 6f 75 6c 64 20 62 65 20 |nction c|ould be |
|00005090| 75 73 65 64 20 61 74 20 | 6d 6f 72 65 20 64 61 6e |used at |more dan|
|000050a0| 67 65 72 6f 75 73 20 74 | 69 6d 65 73 2e 20 59 6f |gerous t|imes. Yo|
|000050b0| 75 20 6e 65 65 64 20 74 | 6f 20 64 65 66 69 6e 65 |u need t|o define|
|000050c0| 20 61 20 73 70 65 63 69 | 66 69 63 20 77 61 79 20 | a speci|fic way |
|000050d0| 74 6f 20 69 6e 66 6f 72 | 6d 20 79 6f 75 72 20 66 |to infor|m your f|
|000050e0| 75 6e 63 74 69 6f 6e 20 | 74 68 61 74 20 69 74 d5 |unction |that it.|
|000050f0| 73 20 6f 6e 6c 79 20 62 | 65 65 6e 20 63 61 6c 6c |s only b|een call|
|00005100| 65 64 20 74 6f 20 6c 6f | 61 64 20 69 74 73 20 65 |ed to lo|ad its e|
|00005110| 6e 74 72 79 2c 20 61 6e | 64 20 6e 6f 74 20 74 6f |ntry, an|d not to|
|00005120| 20 64 6f 20 61 6e 79 20 | 75 73 65 66 75 6c 20 77 | do any |useful w|
|00005130| 6f 72 6b 20 28 75 6e 74 | 69 6c 20 6c 61 74 65 72 |ork (unt|il later|
|00005140| 29 2e 0d 43 6f 6e 63 6c | 75 73 69 6f 6e 0d 49 74 |)..Concl|usion.It|
|00005150| 20 69 73 20 68 6f 70 65 | 64 20 74 68 61 74 20 74 | is hope|d that t|
|00005160| 68 65 73 65 20 73 75 67 | 67 65 73 74 69 6f 6e 73 |hese sug|gestions|
|00005170| 20 77 69 6c 6c 20 69 6d | 70 72 6f 76 65 20 74 68 | will im|prove th|
|00005180| 65 20 73 65 67 6d 65 6e | 74 61 74 69 6f 6e 20 73 |e segmen|tation s|
|00005190| 74 72 61 74 65 67 69 65 | 73 20 69 6e 20 79 6f 75 |trategie|s in you|
|000051a0| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 2e 20 46 |r applic|ation. F|
|000051b0| 75 74 75 72 65 20 6e 65 | 77 20 72 75 6e 74 69 6d |uture ne|w runtim|
|000051c0| 65 20 6d 6f 64 65 6c 73 | 20 28 74 68 65 20 53 68 |e models| (the Sh|
|000051d0| 61 72 65 64 20 4c 69 62 | 72 61 72 79 20 4d 61 6e |ared Lib|rary Man|
|000051e0| 61 67 65 72 2c 20 50 6f | 77 65 72 50 43 20 72 75 |ager, Po|werPC ru|
|000051f0| 6e 74 69 6d 65 20 65 6e | 76 69 72 6f 6e 6d 65 6e |ntime en|vironmen|
|00005200| 74 73 2c 20 42 65 64 72 | 6f 63 6b 29 20 6d 69 67 |ts, Bedr|ock) mig|
|00005210| 68 74 20 72 61 64 69 63 | 61 6c 6c 79 20 63 68 61 |ht radic|ally cha|
|00005220| 6e 67 65 20 74 68 65 20 | 77 61 79 20 64 65 76 65 |nge the |way deve|
|00005230| 6c 6f 70 65 72 73 20 73 | 65 67 6d 65 6e 74 20 63 |lopers s|egment c|
|00005240| 6f 64 65 2e 20 53 74 61 | 79 20 74 75 6e 65 64 20 |ode. Sta|y tuned |
|00005250| 66 6f 72 20 6d 6f 72 65 | 20 6e 65 77 73 2e 0d 46 |for more| news..F|
|00005260| 75 72 74 68 65 72 20 52 | 65 66 65 72 65 6e 63 65 |urther R|eference|
|00005270| 3a 0d 09 a5 20 49 6e 73 | 69 64 65 20 4d 61 63 69 |:... Ins|ide Maci|
|00005280| 6e 74 6f 73 68 2c 20 56 | 6f 6c 75 6d 65 20 49 49 |ntosh, V|olume II|
|00005290| 2c 20 43 68 61 70 74 65 | 72 20 32 20 28 53 65 67 |, Chapte|r 2 (Seg|
|000052a0| 6d 65 6e 74 20 4c 6f 61 | 64 65 72 29 0d 09 a5 20 |ment Loa|der)... |
|000052b0| 4d 50 57 20 43 6f 6d 6d | 61 6e 64 20 52 65 66 65 |MPW Comm|and Refe|
|000052c0| 72 65 6e 63 65 20 28 66 | 6f 72 74 68 63 6f 6d 69 |rence (f|orthcomi|
|000052d0| 6e 67 29 0d 09 a5 20 42 | 75 69 6c 64 69 6e 67 20 |ng)... B|uilding |
|000052e0| 61 6e 64 20 4d 61 6e 61 | 67 69 6e 67 20 50 72 6f |and Mana|ging Pro|
|000052f0| 67 72 61 6d 73 20 69 6e | 20 4d 50 57 20 28 66 6f |grams in| MPW (fo|
|00005300| 72 74 68 63 6f 6d 69 6e | 67 29 0d 09 a5 20 4d 50 |rthcomin|g)... MP|
|00005310| 57 20 33 2e 32 20 52 65 | 6c 65 61 73 65 20 4e 6f |W 3.2 Re|lease No|
|00005320| 74 65 73 0d 09 a5 20 47 | 75 69 64 65 20 74 6f 20 |tes... G|uide to |
|00005330| 4d 61 63 41 70 70 20 54 | 6f 6f 6c 73 20 28 4d 61 |MacApp T|ools (Ma|
|00005340| 63 41 70 70 20 33 2e 30 | 29 0d 09 a5 20 4d 41 44 |cApp 3.0|)... MAD|
|00005350| 41 20 39 32 20 4f 72 6c | 61 6e 64 6f 20 43 6f 6e |A 92 Orl|ando Con|
|00005360| 66 65 72 65 6e 63 65 20 | 43 44 2c 20 50 72 65 73 |ference |CD, Pres|
|00005370| 65 6e 74 61 74 69 6f 6e | 20 6f 6e 20 74 68 65 20 |entation| on the |
|00005380| 4d 61 63 41 70 70 20 33 | 2e 30 20 4d 65 6d 6f 72 |MacApp 3|.0 Memor|
|00005390| 79 20 0d 09 20 4d 61 6e | 61 67 65 72 0d 17 f8 00 |y .. Man|ager....|
|000053a0| 00 00 00 03 48 02 52 00 | 11 02 ff 0c 00 ff ff ff |....H.R.|........|
|000053b0| ff 00 00 00 00 00 00 00 | 00 02 52 00 00 03 48 00 |........|..R...H.|
|000053c0| 00 00 00 00 00 00 a1 00 | 64 00 0c 57 4f 52 44 00 |........|d..WORD.|
|000053d0| 00 00 00 00 53 01 ca 00 | a0 00 8c 00 a1 00 64 00 |....S...|......d.|
|000053e0| 0c 57 4f 52 44 00 00 00 | 00 00 52 01 c9 00 a0 00 |.WORD...|..R.....|
|000053f0| 82 00 1e 00 01 00 0a 00 | 2f 00 5a 00 81 02 23 00 |........|/.Z...#.|
|00005400| 07 00 00 00 00 00 08 00 | 0a 00 09 30 49 88 3a b5 |........|...0I.:.|
|00005410| 9c f0 39 00 22 00 7b 02 | 1a 00 00 00 09 ff ff ff |..9.".{.|........|
|00005420| ff ff ff ff ff 00 23 00 | 00 00 a0 00 c4 00 a1 00 |......#.|........|
|00005430| 64 00 0a 4f 4e 4c 4e 00 | 66 00 00 01 fe 00 a0 00 |d..ONLN.|f.......|
|00005440| 8c 00 a1 00 64 00 31 64 | 72 77 32 00 02 01 c9 00 |....d.1d|rw2.....|
|00005450| 2d 01 e1 01 5f 00 00 80 | 00 00 00 00 00 00 00 00 |-..._...|........|
|00005460| 00 00 00 00 00 00 00 00 | 00 ff ff ff ff ff ff 00 |........|........|
|00005470| 01 00 00 01 8f 00 00 00 | 00 00 a1 00 96 00 0c 01 |........|........|
|00005480| 00 00 00 02 78 00 00 00 | 00 00 00 00 a1 00 64 00 |....x...|......d.|
|00005490| 10 64 72 77 32 00 3a 00 | 05 00 00 00 00 00 01 00 |.drw2.:.|........|
|000054a0| 00 00 a1 00 64 00 0e 64 | 72 77 32 00 3a 00 02 00 |....d..d|rw2.:...|
|000054b0| 24 00 00 00 00 00 a1 00 | 64 00 34 64 72 77 32 00 |$.......|d.4drw2.|
|000054c0| 3a 00 01 00 03 01 00 00 | 18 00 00 00 00 00 00 00 |:.......|........|
|000054d0| 00 00 00 00 01 00 01 00 | 01 00 01 00 00 00 00 00 |........|........|
|000054e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000054f0| a1 00 9a 00 08 ff fa 00 | 00 00 97 40 00 00 a0 00 |........|...@....|
|00005500| 98 00 2c 00 08 00 14 05 | 54 69 6d 65 73 00 03 00 |..,.....|Times...|
|00005510| 14 00 04 01 00 00 0d 00 | 18 00 2e 00 04 00 00 01 |........|........|
|00005520| 00 00 10 65 52 53 0f 65 | 52 53 0f 00 2b 5d 42 13 |...eRS.e|RS..+]B.|
|00005530| 4e 65 77 20 54 65 63 68 | 6e 69 63 61 6c 20 4e 6f |New Tech|nical No|
|00005540| 74 65 73 00 a0 00 99 00 | a1 00 64 00 08 64 72 77 |tes.....|..d..drw|
|00005550| 32 00 3a 00 04 00 a1 14 | e3 00 02 00 01 00 a0 00 |2.:.....|........|
|00005560| 97 00 a1 00 64 00 31 64 | 72 77 32 00 02 02 06 01 |....d.1d|rw2.....|
|00005570| 65 02 19 01 f4 00 00 80 | 00 00 00 00 00 00 00 00 |e.......|........|
|00005580| 00 00 00 00 00 00 00 00 | 00 ff ff ff ff ff ff 00 |........|........|
|00005590| 01 00 00 01 50 00 00 00 | 00 00 a1 00 96 00 0c 01 |....P...|........|
|000055a0| 00 00 00 02 78 00 00 00 | 00 00 00 00 a1 00 64 00 |....x...|......d.|
|000055b0| 10 64 72 77 32 00 3a 00 | 05 00 00 00 00 00 01 00 |.drw2.:.|........|
|000055c0| 00 00 a1 00 64 00 0e 64 | 72 77 32 00 3a 00 02 00 |....d..d|rw2.:...|
|000055d0| 24 00 00 00 00 00 a1 00 | 64 00 34 64 72 77 32 00 |$.......|d.4drw2.|
|000055e0| 3a 00 01 00 03 00 00 00 | 12 00 00 00 00 00 00 00 |:.......|........|
|000055f0| 00 00 00 00 01 00 01 00 | 01 00 01 00 00 00 00 00 |........|........|
|00005600| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005610| a1 00 9a 00 08 ff fb 80 | 00 00 45 c0 00 00 a0 00 |........|..E.....|
|00005620| 98 00 04 00 00 00 0d 00 | 12 00 15 16 80 00 28 00 |........|......(.|
|00005630| 7b 01 95 11 44 65 76 65 | 6c 6f 70 65 72 20 53 75 |{...Deve|loper Su|
|00005640| 70 70 6f 72 74 00 a0 00 | 99 00 a1 00 64 00 08 64 |pport...|....d..d|
|00005650| 72 77 32 00 3a 00 04 00 | a1 14 e3 00 02 00 01 00 |rw2.:...|........|
|00005660| a0 00 97 00 a1 00 64 00 | 60 64 72 77 32 00 03 02 |......d.|`drw2...|
|00005670| 00 00 2d 02 00 01 ef 00 | 00 00 00 00 00 00 00 02 |..-.....|........|
|00005680| 02 00 00 00 00 00 00 00 | 00 00 00 ff ff ff ff ff |........|........|
|00005690| ff 00 01 00 01 08 4b 00 | 00 00 00 02 00 01 ef 02 |......K.|........|
|000056a0| 00 00 2d 00 00 00 00 00 | 00 00 00 00 01 00 14 00 |..-.....|........|
|000056b0| 0c 00 03 00 02 00 00 00 | 5a 00 01 00 00 00 02 00 |........|Z.......|
|000056c0| 00 00 03 00 0c 00 00 00 | 00 00 07 00 02 00 02 00 |........|........|
|000056d0| 08 00 08 00 20 00 66 02 | 1c 00 66 00 5a 00 a1 00 |.... .f.|..f.Z...|
|000056e0| 64 00 31 64 72 77 32 00 | 02 01 ca 01 c0 01 fa 01 |d.1drw2.|........|
|000056f0| e9 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005700| 00 00 00 00 00 ff ff ff | ff ff ff 00 01 00 00 01 |........|........|
|00005710| 4b 00 00 00 00 00 a1 00 | 96 00 0c 01 00 00 00 02 |K.......|........|
|00005720| 78 00 00 00 00 00 00 00 | a1 00 64 00 10 64 72 77 |x.......|..d..drw|
|00005730| 32 00 3a 00 05 00 00 00 | 00 00 01 00 00 00 a1 00 |2.:.....|........|
|00005740| 64 00 0e 64 72 77 32 00 | 3a 00 02 00 24 00 00 00 |d..drw2.|:...$...|
|00005750| 00 00 a1 00 64 00 34 64 | 72 77 32 00 3a 00 01 00 |....d.4d|rw2.:...|
|00005760| 03 00 00 00 30 00 00 00 | 00 00 00 00 00 00 00 00 |....0...|........|
|00005770| 01 00 01 00 01 00 01 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005780| 00 00 00 00 00 00 00 00 | 00 00 00 00 a1 00 9a 00 |........|........|
|00005790| 08 ff f4 00 00 00 13 80 | 00 00 a0 00 98 00 0d 00 |........|........|
|000057a0| 30 00 28 00 55 01 ef 01 | f0 00 a0 00 99 00 a1 00 |0.(.U...|........|
|000057b0| 64 00 08 64 72 77 32 00 | 3a 00 04 00 a1 14 e3 00 |d..drw2.|:.......|
|000057c0| 02 00 01 00 a0 00 97 00 | a1 00 64 00 31 64 72 77 |........|..d.1drw|
|000057d0| 32 00 02 01 ef 01 e6 01 | fa 01 f0 00 00 00 00 00 |2.......|........|
|000057e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 ff |........|........|
|000057f0| ff ff ff ff ff 00 01 00 | 00 01 00 00 00 00 00 00 |........|........|
|00005800| a1 00 96 00 0c 01 00 00 | 00 02 78 00 00 00 00 00 |........|..x.....|
|00005810| 00 00 a1 00 64 00 10 64 | 72 77 32 00 3a 00 05 00 |....d..d|rw2.:...|
|00005820| 00 00 00 00 01 00 00 00 | a1 00 64 00 0e 64 72 77 |........|..d..drw|
|00005830| 32 00 3a 00 02 00 24 00 | 00 00 00 00 a1 00 64 00 |2.:...$.|......d.|
|00005840| 34 64 72 77 32 00 3a 00 | 01 00 03 00 00 00 09 00 |4drw2.:.|........|
|00005850| 00 00 00 00 00 00 00 00 | 00 00 01 00 01 00 01 00 |........|........|
|00005860| 01 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005870| 00 00 00 00 00 00 a1 00 | 9a 00 08 ff fd 80 00 00 |........|........|
|00005880| 04 00 00 00 a0 00 98 00 | 0d 00 09 00 15 6c 00 00 |........|.....l..|
|00005890| 2b 26 09 01 a8 00 a0 00 | 99 00 a1 00 64 00 08 64 |+&......|....d..d|
|000058a0| 72 77 32 00 3a 00 04 00 | a1 14 e3 00 02 00 01 00 |rw2.:...|........|
|000058b0| a0 00 97 00 a1 00 64 00 | 31 64 72 77 32 00 02 01 |......d.|1drw2...|
|000058c0| e5 00 2d 01 f8 00 79 00 | 00 00 00 00 00 00 00 00 |..-...y.|........|
|000058d0| 00 00 00 00 00 00 00 00 | 00 00 00 ff ff ff ff ff |........|........|
|000058e0| ff 00 01 00 01 01 00 00 | 00 01 00 00 a1 00 96 00 |........|........|
|000058f0| 0c 01 00 00 00 02 78 00 | 00 00 00 00 00 00 a1 00 |......x.|........|
|00005900| 64 00 10 64 72 77 32 00 | 3a 00 05 00 00 00 00 00 |d..drw2.|:.......|
|00005910| 01 00 00 00 a1 00 64 00 | 0e 64 72 77 32 00 3a 00 |......d.|.drw2.:.|
|00005920| 02 00 24 00 00 00 00 00 | a1 00 64 00 34 64 72 77 |..$.....|..d.4drw|
|00005930| 32 00 3a 00 01 00 03 00 | 00 00 12 00 00 00 00 00 |2.:.....|........|
|00005940| 00 00 00 00 00 00 01 00 | 01 00 01 00 01 00 00 00 |........|........|
|00005950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005960| 00 00 a1 00 9a 00 08 ff | fb 80 00 00 25 00 00 00 |........|....%...|
|00005970| a0 00 98 00 0d 00 12 00 | 15 42 80 00 28 00 5a 00 |........|.B..(.Z.|
|00005980| 5c 09 4d 61 63 69 6e 74 | 6f 73 68 00 a0 00 99 00 |\.Macint|osh.....|
|00005990| a1 00 64 00 08 64 72 77 | 32 00 3a 00 04 00 a1 14 |..d..drw|2.:.....|
|000059a0| e3 00 02 00 01 00 a0 00 | 97 00 a0 00 8d 00 a1 00 |........|........|
|000059b0| 64 00 06 64 72 77 32 00 | 44 00 a0 00 83 00 a1 00 |d..drw2.|D.......|
|000059c0| 64 00 04 57 4f 52 44 00 | a0 00 8d 00 01 00 0a 00 |d..WORD.|........|
|000059d0| 00 00 00 03 48 02 52 00 | 04 01 00 00 2e 00 04 00 |....H.R.|........|
|000059e0| 00 00 00 00 10 00 01 00 | 01 00 01 00 01 00 a1 00 |........|........|
|000059f0| 64 00 10 4f 4e 4c 4e 00 | 64 00 00 00 8e 00 5a 00 |d..ONLN.|d.....Z.|
|00005a00| a1 01 cb 00 28 00 9c 00 | 5a 29 50 54 20 32 31 20 |....(...|Z)PT 21 |
|00005a10| 2d 20 4d 61 63 41 70 70 | 20 53 65 67 6d 65 6e 74 |- MacApp| Segment|
|00005a20| 61 74 69 6f 6e 20 49 6c | 6c 75 6d 69 6e 61 74 69 |ation Il|luminati|
|00005a30| 6f 6e 73 00 0d 00 0e 00 | a1 00 64 00 10 4f 4e 4c |ons.....|..d..ONL|
|00005a40| 4e 00 64 00 2a 00 a0 00 | 5a 00 af 00 e1 00 2a 10 |N.d.*...|Z.....*.|
|00005a50| 13 50 6c 61 74 66 6f 72 | 6d 73 20 61 6e 64 20 54 |.Platfor|ms and T|
|00005a60| 6f 6f 6c 73 00 00 04 00 | 00 00 0d 00 0c 00 a1 00 |ools....|........|
|00005a70| 64 00 10 4f 4e 4c 4e 00 | 64 00 3f 00 bb 00 5a 00 |d..ONLN.|d.?...Z.|
|00005a80| c7 00 8f 00 2a 18 0b 57 | 72 69 74 74 65 6e 20 62 |....*..W|ritten b|
|00005a90| 79 3a 00 00 a1 00 64 00 | 10 4f 4e 4c 4e 00 64 00 |y:....d.|.ONLN.d.|
|00005aa0| 4b 00 bb 00 a2 00 c7 01 | 4e 00 29 48 21 4b 65 6e |K.......|N.)H!Ken|
|00005ab0| 74 20 53 61 6e 64 76 69 | 6b 20 61 6e 64 20 4d 69 |t Sandvi|k and Mi|
|00005ac0| 63 68 61 65 6c 20 42 75 | 72 62 69 64 67 65 00 00 |chael Bu|rbidge..|
|00005ad0| a1 00 64 00 10 4f 4e 4c | 4e 00 64 00 6d 00 bb 01 |..d..ONL|N.d.m...|
|00005ae0| d2 00 c7 02 1c 00 28 00 | c4 01 d2 0d 44 65 63 65 |......(.|....Dece|
|00005af0| 6d 62 65 72 20 31 39 39 | 32 00 06 00 04 00 00 00 |mber 199|2.......|
|00005b00| a1 00 64 00 10 4f 4e 4c | 4e 00 64 00 7b 00 d3 00 |..d..ONL|N.d.{...|
|00005b10| 5a 00 df 00 fb 00 28 00 | dc 00 5a 1e 54 68 69 73 |Z.....(.|..Z.This|
|00005b20| 20 54 65 63 68 6e 69 63 | 61 6c 20 4e 6f 74 65 20 | Technic|al Note |
|00005b30| 64 65 73 63 72 69 62 65 | 73 20 00 00 06 00 05 00 |describe|s ......|
|00005b40| 00 00 a1 00 64 00 10 4f | 4e 4c 4e 00 64 00 99 00 |....d..O|NLN.d...|
|00005b50| d3 00 fb 00 df 02 1c 00 | 29 a1 36 4d 61 63 41 70 |........|).6MacAp|
|00005b60| 70 20 73 65 67 6d 65 6e | 74 61 74 69 6f 6e 20 73 |p segmen|tation s|
|00005b70| 74 72 61 74 65 67 69 65 | 73 20 61 6e 64 20 67 75 |trategie|s and gu|
|00005b80| 69 64 65 6c 69 6e 65 73 | 2e 20 49 74 20 61 6c 73 |idelines|. It als|
|00005b90| 6f 00 06 00 01 00 00 00 | a1 00 64 00 10 4f 4e 4c |o.......|..d..ONL|
|00005ba0| 4e 00 64 00 d0 00 df 00 | 5a 00 eb 01 ba 00 28 00 |N.d.....|Z.....(.|
|00005bb0| e8 00 5a 48 64 65 73 63 | 72 69 62 65 73 20 70 65 |..ZHdesc|ribes pe|
|00005bc0| 72 66 6f 72 6d 61 6e 63 | 65 2c 20 72 75 6e 74 69 |rformanc|e, runti|
|00005bd0| 6d 65 2c 20 61 6e 64 20 | 64 65 76 65 6c 6f 70 6d |me, and |developm|
|00005be0| 65 6e 74 20 74 6f 6f 6c | 73 20 69 73 73 75 65 73 |ent tool|s issues|
|00005bf0| 20 72 65 6c 61 74 65 64 | 20 74 6f 20 00 00 06 00 | related| to ....|
|00005c00| 02 00 00 00 a1 00 64 00 | 10 4f 4e 4c 4e 00 64 01 |......d.|.ONLN.d.|
|00005c10| 18 00 df 01 ba 00 eb 02 | 1c 00 28 00 e8 01 ba 12 |........|..(.....|
|00005c20| 73 65 67 6d 65 6e 74 61 | 74 69 6f 6e 2e 20 53 6f |segmenta|tion. So|
|00005c30| 6d 65 00 00 06 00 01 00 | 00 00 a1 00 64 00 10 4f |me......|....d..O|
|00005c40| 4e 4c 4e 00 64 01 2b 00 | eb 00 5a 00 f7 00 fc 00 |NLN.d.+.|..Z.....|
|00005c50| 28 00 f4 00 5a 23 6f 66 | 20 74 68 65 20 64 69 73 |(...Z#of| the dis|
|00005c60| 63 75 73 73 69 6f 6e 20 | 69 73 20 61 6c 73 6f 20 |cussion |is also |
|00005c70| 72 65 6c 65 76 61 6e 74 | 20 00 06 00 02 00 00 00 |relevant| .......|
|00005c80| a1 00 64 00 10 4f 4e 4c | 4e 00 64 01 4e 00 eb 00 |..d..ONL|N.d.N...|
|00005c90| fc 00 f7 02 1c 00 29 a2 | 38 74 6f 20 67 65 6e 65 |......).|8to gene|
|00005ca0| 72 61 6c 20 73 65 67 6d | 65 6e 74 61 74 69 6f 6e |ral segm|entation|
|00005cb0| 20 73 74 72 61 74 65 67 | 69 65 73 20 77 69 74 68 | strateg|ies with|
|00005cc0| 20 6e 6f 6e 2d 4d 61 63 | 41 70 70 2d 62 61 73 65 | non-Mac|App-base|
|00005cd0| 64 00 06 00 00 00 00 00 | a1 00 64 00 10 4f 4e 4c |d.......|..d..ONL|
|00005ce0| 4e 00 64 01 87 00 f7 00 | 5a 01 03 01 3d 00 28 01 |N.d.....|Z...=.(.|
|00005cf0| 00 00 5a 2e 61 70 70 6c | 69 63 61 74 69 6f 6e 73 |..Z.appl|ications|
|00005d00| 2e 20 54 68 65 20 4d 61 | 63 41 70 70 20 74 65 63 |. The Ma|cApp tec|
|00005d10| 68 6e 69 71 75 65 73 20 | 61 72 65 20 62 61 73 65 |hniques |are base|
|00005d20| 64 20 00 00 06 00 01 00 | 00 00 a1 00 64 00 10 4f |d ......|....d..O|
|00005d30| 4e 4c 4e 00 64 01 b5 00 | f7 01 3d 01 03 02 1c 00 |NLN.d...|..=.....|
|00005d40| 29 e3 2a 6f 6e 20 4d 61 | 63 41 70 70 20 33 2e 30 |).*on Ma|cApp 3.0|
|00005d50| 3b 20 68 6f 77 65 76 65 | 72 2c 20 6d 61 6e 79 20 |; howeve|r, many |
|00005d60| 6f 66 20 74 68 65 20 69 | 73 73 75 65 73 00 06 00 |of the i|ssues...|
|00005d70| 00 00 00 00 a1 00 64 00 | 10 4f 4e 4c 4e 00 64 01 |......d.|.ONLN.d.|
|00005d80| e0 01 03 00 5a 01 0f 00 | f4 00 28 01 0c 00 5a 20 |....Z...|..(...Z |
|00005d90| 61 72 65 20 61 6c 73 6f | 20 72 65 6c 65 76 61 6e |are also| relevan|
|00005da0| 74 20 74 6f 20 4d 61 63 | 41 70 70 20 32 2e 30 2e |t to Mac|App 2.0.|
|00005db0| 00 00 07 00 01 00 01 00 | 20 01 1b 00 58 01 1b 02 |........| ...X...|
|00005dc0| 1d 00 04 01 00 00 0d 00 | 0e 00 a1 00 64 00 10 4f |........|....d..O|
|00005dd0| 4e 4c 4e 00 64 02 01 01 | 34 00 5a 01 43 00 ad 00 |NLN.d...|4.Z.C...|
|00005de0| 2a 34 0c 49 6e 74 72 6f | 64 75 63 74 69 6f 6e 00 |*4.Intro|duction.|
|00005df0| 04 00 00 00 0d 00 0c 00 | a1 00 64 00 10 4f 4e 4c |........|..d..ONL|
|00005e00| 4e 00 64 02 0e 01 4f 00 | 5a 01 5b 01 71 00 2a 18 |N.d...O.|Z.[.q.*.|
|00005e10| 3a 53 6f 6d 65 20 70 65 | 6f 70 6c 65 20 63 6f 6e |:Some pe|ople con|
|00005e20| 73 69 64 65 72 20 64 65 | 66 69 6e 69 6e 67 20 61 |sider de|fining a|
|00005e30| 20 73 65 67 6d 65 6e 74 | 61 74 69 6f 6e 20 73 74 | segment|ation st|
|00005e40| 72 61 74 65 67 79 20 66 | 6f 72 20 00 06 00 01 00 |rategy f|or .....|
|00005e50| 00 00 a1 00 64 00 10 4f | 4e 4c 4e 00 64 02 48 01 |....d..O|NLN.d.H.|
|00005e60| 4f 01 71 01 5b 02 1c 00 | 28 01 58 01 71 24 61 20 |O.q.[...|(.X.q$a |
|00005e70| 4d 61 63 69 6e 74 6f 73 | 68 20 61 70 70 6c 69 63 |Macintos|h applic|
|00005e80| 61 74 69 6f 6e 20 61 20 | 62 6c 61 63 6b 20 61 72 |ation a |black ar|
|00005e90| 74 2e 00 00 06 00 00 00 | 00 00 a1 00 64 00 10 4f |t.......|....d..O|
|00005ea0| 4e 4c 4e 00 64 02 6d 01 | 5b 00 5a 01 67 01 10 00 |NLN.d.m.|[.Z.g...|
|00005eb0| 28 01 64 00 5a 27 57 65 | 6c 6c 2c 20 69 74 20 69 |(.d.Z'We|ll, it i|
|00005ec0| 73 20 61 20 66 6f 72 6d | 20 6f 66 20 70 72 6f 67 |s a form| of prog|
|00005ed0| 72 61 6d 6d 69 6e 67 20 | 61 72 74 2e 20 00 06 00 |ramming |art. ...|
|00005ee0| 01 00 00 00 a1 00 64 00 | 10 4f 4e 4c 4e 00 64 02 |......d.|.ONLN.d.|
|00005ef0| 94 01 5b 01 10 01 67 02 | 1c 00 29 b6 34 4c 69 6b |..[...g.|..).4Lik|
|00005f00| 65 20 6d 61 6e 79 20 70 | 72 6f 62 6c 65 6d 73 20 |e many p|roblems |
|00005f10| 69 6e 20 73 6f 66 74 77 | 61 72 65 20 64 65 76 65 |in softw|are deve|
|00005f20| 6c 6f 70 6d 65 6e 74 2c | 20 64 65 66 69 6e 69 6e |lopment,| definin|
|00005f30| 67 00 a1 00 64 00 10 4f | 4e 4c 4e 00 64 02 c9 01 |g...d..O|NLN.d...|
|00005f40| 67 00 5a 01 73 00 e0 00 | 28 01 70 00 5a 1c 61 20 |g.Z.s...|(.p.Z.a |
|00005f50| 73 65 67 6d 65 6e 74 61 | 74 69 6f 6e 20 73 74 72 |segmenta|tion str|
|00005f60| 61 74 65 67 79 20 66 6f | 72 20 00 00 06 00 02 00 |ategy fo|r ......|
|00005f70| 00 00 a1 00 64 00 10 4f | 4e 4c 4e 00 64 02 e5 01 |....d..O|NLN.d...|
|00005f80| 67 00 e0 01 73 02 1c 00 | 29 86 3d 61 20 4d 61 63 |g...s...|).=a Mac|
|00005f90| 69 6e 74 6f 73 68 20 61 | 70 70 6c 69 63 61 74 69 |intosh a|pplicati|
|00005fa0| 6f 6e 20 72 65 71 75 69 | 72 65 73 20 63 68 6f 6f |on requi|res choo|
|00005fb0| 73 69 6e 67 20 62 65 74 | 77 65 65 6e 20 61 20 6e |sing bet|ween a n|
|00005fc0| 75 6d 62 65 72 20 6f 66 | 00 00 a1 00 64 00 10 4f |umber of|....d..O|
|00005fd0| 4e 4c 4e 00 64 03 23 01 | 73 00 5a 01 7f 00 e9 00 |NLN.d.#.|s.Z.....|
|00005fe0| 28 01 7c 00 5a 1e 63 6f | 6e 66 6c 69 63 74 69 6e |(.|.Z.co|nflictin|
|00005ff0| 67 20 74 72 61 64 65 6f | 66 66 73 20 74 6f 20 6d |g tradeo|ffs to m|
|00006000| 65 65 74 20 00 00 06 00 | 03 00 00 00 a1 00 64 00 |eet ....|......d.|
|00006010| 10 4f 4e 4c 4e 00 64 03 | 41 01 73 00 e9 01 7f 02 |.ONLN.d.|A.s.....|
|00006020| 1c 00 29 8f 3d 74 68 65 | 20 70 65 72 66 6f 72 6d |..).=the| perform|
|00006030| 61 6e 63 65 20 63 72 69 | 74 65 72 69 61 20 6f 66 |ance cri|teria of|
|00006040| 20 61 20 67 69 76 65 6e | 20 61 70 70 6c 69 63 61 | a given| applica|
|00006050| 74 69 6f 6e 2e 20 53 65 | 67 6d 65 6e 74 61 74 69 |tion. Se|gmentati|
|00006060| 6f 6e 00 00 06 00 01 00 | 00 00 a1 00 64 00 10 4f |on......|....d..O|
|00006070| 4e 4c 4e 00 64 03 7f 01 | 7f 00 5a 01 8b 00 e3 00 |NLN.d...|..Z.....|
|00006080| 28 01 88 00 5a 1e 73 74 | 72 61 74 65 67 69 65 73 |(...Z.st|rategies|
|00006090| 20 74 68 61 74 20 61 72 | 65 20 6f 70 74 69 6d 69 | that ar|e optimi|
|000060a0| 7a 65 64 20 00 00 06 00 | 02 00 00 00 a1 00 64 00 |zed ....|......d.|
|000060b0| 10 4f 4e 4c 4e 00 64 03 | 9d 01 7f 00 e3 01 8b 02 |.ONLN.d.|........|
|000060c0| 1c 00 29 89 3f 66 6f 72 | 20 73 70 65 65 64 20 67 |..).?for| speed g|
|000060d0| 65 6e 65 72 61 6c 6c 79 | 20 72 65 71 75 69 72 65 |enerally| require|
|000060e0| 20 61 20 6c 61 72 67 65 | 72 20 66 6f 6f 74 70 72 | a large|r footpr|
|000060f0| 69 6e 74 20 69 6e 20 6d | 65 6d 6f 72 79 2c 20 77 |int in m|emory, w|
|00006100| 68 69 6c 65 00 00 06 00 | 01 00 00 00 a1 00 64 00 |hile....|......d.|
|00006110| 10 4f 4e 4c 4e 00 64 03 | dd 01 8b 00 5a 01 97 01 |.ONLN.d.|....Z...|
|00006120| 3f 00 28 01 94 00 5a 2f | 73 74 72 61 74 65 67 69 |?.(...Z/|strategi|
|00006130| 65 73 20 74 68 61 74 20 | 61 72 65 20 6f 70 74 69 |es that |are opti|
|00006140| 6d 69 7a 65 64 20 66 6f | 72 20 6d 65 6d 6f 72 79 |mized fo|r memory|
|00006150| 20 75 73 61 67 65 20 00 | 06 00 02 00 00 00 a1 00 | usage .|........|
|00006160| 64 00 10 4f 4e 4c 4e 00 | 64 04 0c 01 8b 01 3f 01 |d..ONLN.|d.....?.|
|00006170| 97 02 1c 00 29 e5 2b 63 | 6f 6d 65 20 77 69 74 68 |....).+c|ome with|
|00006180| 20 61 20 70 65 72 66 6f | 72 6d 61 6e 63 65 20 68 | a perfo|rmance h|
|00006190| 69 74 2e 20 55 6e 66 6f | 72 74 75 6e 61 74 65 6c |it. Unfo|rtunatel|
|000061a0| 79 2c 00 00 06 00 00 00 | 00 00 a1 00 64 00 10 4f |y,......|....d..O|
|000061b0| 4e 4c 4e 00 64 04 38 01 | 97 00 5a 01 a3 01 a1 00 |NLN.d.8.|..Z.....|
|000061c0| 28 01 a0 00 5a 47 74 68 | 65 72 65 20 61 72 65 20 |(...ZGth|ere are |
|000061d0| 6e 6f 20 74 6f 6f 6c 73 | 20 61 76 61 69 6c 61 62 |no tools| availab|
|000061e0| 6c 65 20 66 6f 72 20 61 | 75 74 6f 6d 61 74 69 63 |le for a|utomatic|
|000061f0| 61 6c 6c 79 20 73 65 67 | 6d 65 6e 74 69 6e 67 20 |ally seg|menting |
|00006200| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 2e 00 a1 00 |applicat|ions....|
|00006210| 64 00 10 4f 4e 4c 4e 00 | 64 04 81 01 af 00 5a 01 |d..ONLN.|d.....Z.|
|00006220| bb 00 b8 00 2a 18 14 54 | 68 65 72 65 20 61 72 65 |....*..T|here are|
|00006230| 20 66 65 77 20 74 6f 6f | 6c 73 20 00 06 00 01 00 | few too|ls .....|
|00006240| 00 00 a1 00 64 00 10 4f | 4e 4c 4e 00 64 04 95 01 |....d..O|NLN.d...|
|00006250| af 00 b8 01 bb 02 1c 00 | 29 5e 4b 61 76 61 69 6c |........|)^Kavail|
|00006260| 61 62 6c 65 20 74 68 61 | 74 20 68 65 6c 70 20 64 |able tha|t help d|
|00006270| 65 66 69 6e 65 20 73 65 | 67 6d 65 6e 74 61 74 69 |efine se|gmentati|
|00006280| 6f 6e 20 73 74 72 61 74 | 65 67 69 65 73 2e 20 41 |on strat|egies. A|
|00006290| 6c 73 6f 20 74 68 65 20 | 69 6e 66 6f 72 6d 61 74 |lso the |informat|
|000062a0| 69 6f 6e 20 6f 6e 00 00 | 06 00 00 00 00 00 a1 00 |ion on..|........|
|000062b0| 64 00 10 4f 4e 4c 4e 00 | 64 04 e1 01 bb 00 5a 01 |d..ONLN.|d.....Z.|
|000062c0| c7 01 14 00 28 01 c4 00 | 5a 27 68 6f 77 20 74 6f |....(...|Z'how to|
|000062d0| 20 64 6f 20 74 68 69 73 | 20 69 73 20 6e 6f 74 20 | do this| is not |
|000062e0| 66 75 6c 6c 79 20 64 6f | 63 75 6d 65 6e 74 65 64 |fully do|cumented|
|000062f0| 2e 00 a1 00 64 00 10 4f | 4e 4c 4e 00 64 05 09 01 |....d..O|NLN.d...|
|00006300| d3 00 5a 01 df 00 e1 00 | 2a 18 1d 54 68 69 73 20 |..Z.....|*..This |
|00006310| 54 65 63 68 6e 69 63 61 | 6c 20 4e 6f 74 65 20 77 |Technica|l Note w|
|00006320| 69 6c 6c 20 74 72 79 20 | 00 00 06 00 01 00 00 00 |ill try |........|
|00006330| a1 00 64 00 10 4f 4e 4c | 4e 00 64 05 26 01 d3 00 |..d..ONL|N.d.&...|
|00006340| e1 01 df 02 1c 00 29 87 | 3e 74 6f 20 63 6f 76 65 |......).|>to cove|
|00006350| 72 20 74 68 65 20 6d 6f | 73 74 20 69 6d 70 6f 72 |r the mo|st impor|
|00006360| 74 61 6e 74 20 69 73 73 | 75 65 73 20 6f 66 20 73 |tant iss|ues of s|
|00006370| 65 67 6d 65 6e 74 61 74 | 69 6f 6e 20 77 69 74 68 |egmentat|ion with|
|00006380| 20 4d 61 63 41 70 70 00 | 06 00 00 00 00 00 a1 00 | MacApp.|........|
|00006390| 64 00 10 4f 4e 4c 4e 00 | 64 05 65 01 df 00 5a 01 |d..ONLN.|d.e...Z.|
|000063a0| eb 01 b6 00 28 01 e8 00 | 5a 49 70 72 6f 67 72 61 |....(...|ZIprogra|
|000063b0| 6d 73 20 61 6e 64 20 74 | 6f 20 68 65 6c 70 20 64 |ms and t|o help d|
|000063c0| 65 76 65 6c 6f 70 65 72 | 73 20 63 72 65 61 74 65 |eveloper|s create|
|000063d0| 20 74 68 65 69 72 20 6f | 77 6e 20 73 65 67 6d 65 | their o|wn segme|
|000063e0| 6e 74 61 74 69 6f 6e 20 | 73 74 72 61 74 65 67 69 |ntation |strategi|
|000063f0| 65 73 2e 00 04 01 00 00 | 0d 00 0e 00 a1 00 64 00 |es......|......d.|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.